{smcl}
{com}{sf}{ul off}{txt}{.-}
      name:  {res}<unnamed>
       {txt}log:  {res}C:\Users\williamslaro\Documents\Research\Projects\Spatial Economic Voting\TAMU 2013\PSR&M\Replication\Williams Seki and Whitten--Replication.smcl
  {txt}log type:  {res}smcl
 {txt}opened on:  {res}29 May 2014, 09:02:58
{txt}
{com}. 
. ***************************************************************************************
. ********************** Replication: Manuscript ****************************************
. ***************************************************************************************
. 
. *** Model 1: Government/Opposition
. preserve
{txt}
{com}.         global rhs "annual_ch_rgdppc unem_harm_monthly_lag inf_py_quarterly_lag G G_gdp G_un G_inf pervote_tm1 ep_400_tot_tm1_dm elec_ep_400_tot_tm1_dm elec_fam_ep_400_tot_tm1_dm abs_pr niche"
{txt}
{com}.         local w "W1"
{txt}
{com}.         spatwmat using "`w'.dta", name(`w') eigenval(E_`w')


{txt}The following matrices have been created:

1. Imported non-binary weights matrix {res}W1{txt} 
   Dimension: {res}1231x1231

{txt}2. Eigenvalues matrix {res}E_W1
{txt}   Dimension: {res}1231x1


{txt}
{com}.         spatgsa ep_400_tot_dm, w(`w') m g two
{res}

{txt}{title:Measures of global spatial autocorrelation}


Weights matrix
{hline 62}
Name: {res}W1
{txt}Type: {res}Imported (non-binary)
{txt}Row-standardized: {res}No
{txt}{hline 62}

Moran's I
{hline 20}{c TT}{hline 41}
{col 11}Variables {c |}{col 26}I{col 33}E(I){col 40}sd(I){col 50}z{col 55}p-value*
{hline 20}{c +}{hline 41}
{col 1}      ep_400_tot_dm {c |}{res}{col 22}  0.175{col 30} -0.001{col 38}  0.028{col 46}  6.242{col 56}0.000
{txt}{hline 20}{c BT}{hline 41}

Geary's c
{hline 20}{c TT}{hline 41}
{col 11}Variables {c |}{col 26}c{col 33}E(c){col 40}sd(c){col 50}z{col 55}p-value*
{hline 20}{c +}{hline 41}
{col 1}      ep_400_tot_dm {c |}{res}{col 22}  0.706{col 30}  1.000{col 38}  0.050{col 46} -5.843{col 56}0.000
{txt}{hline 20}{c BT}{hline 41}
*2-tail test



{com}.         qui reg ep_400_tot_dm annual_ch_rgdppc unem_harm_monthly_lag inf_py_quarterly_lag G G_gdp G_un G_inf pervote_tm1 ep_400_tot_tm1_dm elec_ep_400_tot_tm1_dm elec_fam_ep_400_tot_tm1_dm abs_pr niche, robust       
{txt}
{com}.         spatdiag, weights(`w')
{res}

{txt}{title:Diagnostic tests for spatial dependence in OLS regression}


Fitted model
{hline 60}
{p 0 16 24}{res}ep_400_tot_dm{txt} = {res}annual_ch_rgdppc{txt} + {res}unem_harm_monthly_lag{txt} + {res}inf_py_quarterly_lag{txt} + {res}G{txt} + {res}G_gdp{txt} + {res}G_un{txt} + {res}G_inf{txt} + {res}pervote_tm1{txt} + {res}ep_400_tot_tm1_dm{txt} + {res}elec_ep_400_tot_tm1_dm{txt} + {res}elec_fam_ep_400_tot_tm1_dm{txt} + {res}abs_pr{txt} + {res}niche
{p_end}
{txt}{hline 60}

Weights matrix
{hline 60}
Name: {res}W1
{txt}Type: {res}Imported (non-binary)
{txt}Row-standardized: {res}No
{txt}{hline 60}

Diagnostics
{hline 31}{c TT}{hline 28}
{col 1}Test{col 32}{c |}{col 35}Statistic{col 48}df{col 53}p-value
{hline 31}{c +}{hline 28}
Spatial error:{col 32}{c |}
  Moran's I{col 32}{c |}{res}{col 35}   8.547{col 48} 1{col 54}0.000
{txt}  Lagrange multiplier{col 32}{c |}{res}{col 35}  41.357{col 48} 1{col 54}0.000
{txt}  Robust Lagrange multiplier{col 32}{c |}{res}{col 35}   6.940{col 48} 1{col 54}0.008
{txt}{col 32}{c |}
Spatial lag:{col 32}{c |}
  Lagrange multiplier{col 32}{c |}{res}{col 35}  34.821{col 48} 1{col 54}0.000
{txt}  Robust Lagrange multiplier{col 32}{c |}{res}{col 35}   0.405{col 48} 1{col 54}0.525
{txt}{hline 31}{c BT}{hline 28}



{com}.         spatreg ep_400_tot_dm $rhs, weights(`w') eigenval(E_`w') model(lag) robust 
{res}
{txt}initial:       log pseudolikelihood = {res}-4410.6685
{txt}rescale:       log pseudolikelihood = {res}-4410.6685
{txt}rescale eq:    log pseudolikelihood = {res}-4410.6685
{txt}Iteration 0:{col 16}log pseudolikelihood = {res}-4410.6685{txt}  
Iteration 1:{col 16}log pseudolikelihood = {res}-4396.6598{txt}  
Iteration 2:{col 16}log pseudolikelihood = {res}-4396.4887{txt}  
Iteration 3:{col 16}log pseudolikelihood = {res}-4396.4886{txt}  
{res}

{txt}Weights matrix
 Name: {res}W1
{txt} Type: {res}Imported (non-binary)
{txt} Row-standardized: {res}No


{txt}Spatial lag model{col 52}Number of obs{col 68}={res}      1231
{txt}{col 52}Variance ratio{col 68}={res}     0.254
{txt}{col 52}Squared corr.{col 68}={res}     0.268
{txt}Log likelihood = {res}-4396.4886{txt}{col 52}Sigma{col 68}={res}      8.57

{txt}{hline 13}{c TT}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{col 14}{c |}{col 26}    Robust
{col 1}ep_400_~t_dm{col 14}{c |}      Coef.{col 26}   Std. Err.{col 38}      z{col 46}   P>|z|{col 54}     [95% Con{col 67}f. Interval]
{hline 13}{c +}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{res}ep_400_~t_dm {txt}{c |}
annual_ch_~c {c |}{col 14}{res}{space 2}-.1419058{col 26}{space 2} .1138149{col 37}{space 1}   -1.25{col 46}{space 3}0.212{col 54}{space 4}-.3649788{col 67}{space 3} .0811673
{txt}unem_harm_~g {c |}{col 14}{res}{space 2} .0585411{col 26}{space 2} .0627656{col 37}{space 1}    0.93{col 46}{space 3}0.351{col 54}{space 4}-.0644772{col 67}{space 3} .1815594
{txt}inf_py_qua~g {c |}{col 14}{res}{space 2} .0294912{col 26}{space 2} .0708362{col 37}{space 1}    0.42{col 46}{space 3}0.677{col 54}{space 4}-.1093451{col 67}{space 3} .1683275
{txt}{space 11}G {c |}{col 14}{res}{space 2}-1.586699{col 26}{space 2} 1.471438{col 37}{space 1}   -1.08{col 46}{space 3}0.281{col 54}{space 4}-4.470664{col 67}{space 3} 1.297267
{txt}{space 7}G_gdp {c |}{col 14}{res}{space 2}-.0569827{col 26}{space 2} .2217338{col 37}{space 1}   -0.26{col 46}{space 3}0.797{col 54}{space 4} -.491573{col 67}{space 3} .3776077
{txt}{space 8}G_un {c |}{col 14}{res}{space 2}   .25285{col 26}{space 2} .1399421{col 37}{space 1}    1.81{col 46}{space 3}0.071{col 54}{space 4}-.0214315{col 67}{space 3} .5271314
{txt}{space 7}G_inf {c |}{col 14}{res}{space 2}  .236552{col 26}{space 2}  .137881{col 37}{space 1}    1.72{col 46}{space 3}0.086{col 54}{space 4}-.0336897{col 67}{space 3} .5067938
{txt}{space 1}pervote_tm1 {c |}{col 14}{res}{space 2} .0866326{col 26}{space 2}  .021135{col 37}{space 1}    4.10{col 46}{space 3}0.000{col 54}{space 4} .0452087{col 67}{space 3} .1280564
{txt}ep_400_~1_dm {c |}{col 14}{res}{space 2} .3184825{col 26}{space 2} .0310691{col 37}{space 1}   10.25{col 46}{space 3}0.000{col 54}{space 4} .2575882{col 67}{space 3} .3793768
{txt}elec_ep_40~m {c |}{col 14}{res}{space 2} .0537966{col 26}{space 2}  .048097{col 37}{space 1}    1.12{col 46}{space 3}0.263{col 54}{space 4}-.0404719{col 67}{space 3} .1480651
{txt}elec_fam_e~m {c |}{col 14}{res}{space 2}-.0985255{col 26}{space 2}   .02659{col 37}{space 1}   -3.71{col 46}{space 3}0.000{col 54}{space 4}-.1506409{col 67}{space 3}-.0464101
{txt}{space 6}abs_pr {c |}{col 14}{res}{space 2}-.1171007{col 26}{space 2} .0230878{col 37}{space 1}   -5.07{col 46}{space 3}0.000{col 54}{space 4}-.1623519{col 67}{space 3}-.0718495
{txt}{space 7}niche {c |}{col 14}{res}{space 2}-.9168334{col 26}{space 2} .6558877{col 37}{space 1}   -1.40{col 46}{space 3}0.162{col 54}{space 4} -2.20235{col 67}{space 3} .3686828
{txt}{space 7}_cons {c |}{col 14}{res}{space 2} .0206569{col 26}{space 2} .8710269{col 37}{space 1}    0.02{col 46}{space 3}0.981{col 54}{space 4}-1.686524{col 67}{space 3} 1.727838
{txt}{hline 13}{c +}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
         rho {c |}  {res} .1663763   .0309708     5.37   0.000{col 58} .1056747    .2270779
{txt}{hline 13}{c BT}{hline 64}
Wald test of rho=0:{col 40}chi2(1) = {res}{col 50} 28.859{txt} ({res}0.000{txt})
Lagrange multiplier test of rho=0:{col 40}chi2(1) = {res}{col 50} 34.821{txt} ({res}0.000{txt})

Acceptable range for rho: {res}-1.000 < rho < 1.000


{txt}
{com}.         me_g


{res}The marginal effect for GDP is -.14190579

The 95% confidence interval is -.36498295       and             .08117136

The 90% confidence interval is -.32970034    and      .04588875

G =       0



The marginal effect for GDP is -.19888844

The 95% confidence interval is -.58255046       and             .18477357

The 90% confidence interval is -.52186922    and      .12409233

G =       1



The marginal effect for unemployment is .05854111

The 95% confidence interval is -.06447946       and             .18156167

The 90% confidence interval is -.04502212    and      .16210434

G =       0



The marginal effect for unemployment is .31139109

The 95% confidence interval is .06243799       and             .56034419

The 90% confidence interval is .10181323    and      .52096896

G =       1



The marginal effect for inflation is .02949121

The 95% confidence interval is -.10934766       and             .16833007

The 90% confidence interval is -.08738845    and      .14637086

G =       0



The marginal effect for inflation is .26604324

The 95% confidence interval is .03239934       and             .49968714

The 90% confidence interval is .06935322    and      .46273325

G =       1

{txt}
{com}.         mat b = e(b)
{txt}
{com}.         svmat b, name(b)
{txt}
{com}.         keep in 1
{txt}(1230 observations deleted)

{com}.         outsheet b* using "b_`w'.csv", comma replace    
{txt}
{com}. /*      
>         capture gen cons = 1
>         keep ep_400_tot_dm $rhs cons
>         order ep_400_tot_dm $rhs cons
>         outsheet using "x_`w'.csv", comma replace 
>         mat b = e(b)
>         svmat b, name(b)
>         keep in 1
>         outsheet b* using "b_`w'.csv", comma replace
>         use "`w'.dta", clear
>         outsheet using "W_`w'.csv", comma replace       
> */
. restore
{txt}
{com}. 
. *** Model 2: Government percentage interactions
. preserve
{txt}
{com}.         global rhs "annual_ch_rgdppc unem_harm_monthly_lag inf_py_quarterly_lag Gperc Gperc_gdp Gperc_un Gperc_inf pervote_tm1 ep_400_tot_tm1_dm elec_ep_400_tot_tm1_dm elec_fam_ep_400_tot_tm1_dm abs_pr niche"
{txt}
{com}.         local w "W1"
{txt}
{com}.         spatwmat using "`w'.dta", name(`w') eigenval(E_`w')


{txt}The following matrices have been created:

1. Imported non-binary weights matrix {res}W1{txt} 
   Dimension: {res}1231x1231

{txt}2. Eigenvalues matrix {res}E_W1
{txt}   Dimension: {res}1231x1


{txt}
{com}.         spatgsa ep_400_tot_dm, w(`w') m g two
{res}

{txt}{title:Measures of global spatial autocorrelation}


Weights matrix
{hline 62}
Name: {res}W1
{txt}Type: {res}Imported (non-binary)
{txt}Row-standardized: {res}No
{txt}{hline 62}

Moran's I
{hline 20}{c TT}{hline 41}
{col 11}Variables {c |}{col 26}I{col 33}E(I){col 40}sd(I){col 50}z{col 55}p-value*
{hline 20}{c +}{hline 41}
{col 1}      ep_400_tot_dm {c |}{res}{col 22}  0.175{col 30} -0.001{col 38}  0.028{col 46}  6.242{col 56}0.000
{txt}{hline 20}{c BT}{hline 41}

Geary's c
{hline 20}{c TT}{hline 41}
{col 11}Variables {c |}{col 26}c{col 33}E(c){col 40}sd(c){col 50}z{col 55}p-value*
{hline 20}{c +}{hline 41}
{col 1}      ep_400_tot_dm {c |}{res}{col 22}  0.706{col 30}  1.000{col 38}  0.050{col 46} -5.843{col 56}0.000
{txt}{hline 20}{c BT}{hline 41}
*2-tail test



{com}.         qui reg ep_400_tot_dm annual_ch_rgdppc unem_harm_monthly_lag inf_py_quarterly_lag Gperc Gperc_gdp Gperc_un Gperc_inf pervote_tm1 ep_400_tot_tm1_dm elec_ep_400_tot_tm1_dm elec_fam_ep_400_tot_tm1_dm abs_pr niche, robust       
{txt}
{com}.         spatdiag, weights(`w')
{res}

{txt}{title:Diagnostic tests for spatial dependence in OLS regression}


Fitted model
{hline 60}
{p 0 16 24}{res}ep_400_tot_dm{txt} = {res}annual_ch_rgdppc{txt} + {res}unem_harm_monthly_lag{txt} + {res}inf_py_quarterly_lag{txt} + {res}Gperc{txt} + {res}Gperc_gdp{txt} + {res}Gperc_un{txt} + {res}Gperc_inf{txt} + {res}pervote_tm1{txt} + {res}ep_400_tot_tm1_dm{txt} + {res}elec_ep_400_tot_tm1_dm{txt} + {res}elec_fam_ep_400_tot_tm1_dm{txt} + {res}abs_pr{txt} + {res}niche
{p_end}
{txt}{hline 60}

Weights matrix
{hline 60}
Name: {res}W1
{txt}Type: {res}Imported (non-binary)
{txt}Row-standardized: {res}No
{txt}{hline 60}

Diagnostics
{hline 31}{c TT}{hline 28}
{col 1}Test{col 32}{c |}{col 35}Statistic{col 48}df{col 53}p-value
{hline 31}{c +}{hline 28}
Spatial error:{col 32}{c |}
  Moran's I{col 32}{c |}{res}{col 35}   8.715{col 48} 1{col 54}0.000
{txt}  Lagrange multiplier{col 32}{c |}{res}{col 35}  43.356{col 48} 1{col 54}0.000
{txt}  Robust Lagrange multiplier{col 32}{c |}{res}{col 35}   8.310{col 48} 1{col 54}0.004
{txt}{col 32}{c |}
Spatial lag:{col 32}{c |}
  Lagrange multiplier{col 32}{c |}{res}{col 35}  35.838{col 48} 1{col 54}0.000
{txt}  Robust Lagrange multiplier{col 32}{c |}{res}{col 35}   0.791{col 48} 1{col 54}0.374
{txt}{hline 31}{c BT}{hline 28}



{com}.         spatreg ep_400_tot_dm $rhs, weights(`w') eigenval(E_`w') model(lag) robust 
{res}
{txt}initial:       log pseudolikelihood = {res}-4412.8552
{txt}rescale:       log pseudolikelihood = {res}-4412.8552
{txt}rescale eq:    log pseudolikelihood = {res}-4412.8552
{txt}Iteration 0:{col 16}log pseudolikelihood = {res}-4412.8552{txt}  
Iteration 1:{col 16}log pseudolikelihood = {res} -4398.481{txt}  
Iteration 2:{col 16}log pseudolikelihood = {res}-4398.2988{txt}  
Iteration 3:{col 16}log pseudolikelihood = {res}-4398.2987{txt}  
{res}

{txt}Weights matrix
 Name: {res}W1
{txt} Type: {res}Imported (non-binary)
{txt} Row-standardized: {res}No


{txt}Spatial lag model{col 52}Number of obs{col 68}={res}      1231
{txt}{col 52}Variance ratio{col 68}={res}     0.251
{txt}{col 52}Squared corr.{col 68}={res}     0.266
{txt}Log likelihood = {res}-4398.2987{txt}{col 52}Sigma{col 68}={res}      8.58

{txt}{hline 13}{c TT}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{col 14}{c |}{col 26}    Robust
{col 1}ep_400_~t_dm{col 14}{c |}      Coef.{col 26}   Std. Err.{col 38}      z{col 46}   P>|z|{col 54}     [95% Con{col 67}f. Interval]
{hline 13}{c +}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{res}ep_400_~t_dm {txt}{c |}
annual_ch_~c {c |}{col 14}{res}{space 2} -.130247{col 26}{space 2} .1107653{col 37}{space 1}   -1.18{col 46}{space 3}0.240{col 54}{space 4}-.3473431{col 67}{space 3}  .086849
{txt}unem_harm_~g {c |}{col 14}{res}{space 2} .0815439{col 26}{space 2}  .061615{col 37}{space 1}    1.32{col 46}{space 3}0.186{col 54}{space 4}-.0392193{col 67}{space 3} .2023071
{txt}inf_py_qua~g {c |}{col 14}{res}{space 2} .0563131{col 26}{space 2} .0694289{col 37}{space 1}    0.81{col 46}{space 3}0.417{col 54}{space 4}-.0797651{col 67}{space 3} .1923913
{txt}{space 7}Gperc {c |}{col 14}{res}{space 2}-3.807465{col 26}{space 2} 2.119236{col 37}{space 1}   -1.80{col 46}{space 3}0.072{col 54}{space 4}-7.961091{col 67}{space 3} .3461611
{txt}{space 3}Gperc_gdp {c |}{col 14}{res}{space 2}-.1514377{col 26}{space 2} .3154058{col 37}{space 1}   -0.48{col 46}{space 3}0.631{col 54}{space 4}-.7696216{col 67}{space 3} .4667462
{txt}{space 4}Gperc_un {c |}{col 14}{res}{space 2} .2718554{col 26}{space 2} .1772725{col 37}{space 1}    1.53{col 46}{space 3}0.125{col 54}{space 4}-.0755923{col 67}{space 3} .6193032
{txt}{space 3}Gperc_inf {c |}{col 14}{res}{space 2} .2404428{col 26}{space 2} .1683251{col 37}{space 1}    1.43{col 46}{space 3}0.153{col 54}{space 4}-.0894683{col 67}{space 3} .5703539
{txt}{space 1}pervote_tm1 {c |}{col 14}{res}{space 2} .1183839{col 26}{space 2} .0257909{col 37}{space 1}    4.59{col 46}{space 3}0.000{col 54}{space 4} .0678346{col 67}{space 3} .1689333
{txt}ep_400_~1_dm {c |}{col 14}{res}{space 2} .3211665{col 26}{space 2}  .031129{col 37}{space 1}   10.32{col 46}{space 3}0.000{col 54}{space 4} .2601547{col 67}{space 3} .3821783
{txt}elec_ep_40~m {c |}{col 14}{res}{space 2} .0433672{col 26}{space 2} .0480154{col 37}{space 1}    0.90{col 46}{space 3}0.366{col 54}{space 4}-.0507412{col 67}{space 3} .1374756
{txt}elec_fam_e~m {c |}{col 14}{res}{space 2}-.0953749{col 26}{space 2} .0266809{col 37}{space 1}   -3.57{col 46}{space 3}0.000{col 54}{space 4}-.1476685{col 67}{space 3}-.0430814
{txt}{space 6}abs_pr {c |}{col 14}{res}{space 2}-.1169011{col 26}{space 2}  .023023{col 37}{space 1}   -5.08{col 46}{space 3}0.000{col 54}{space 4}-.1620253{col 67}{space 3}-.0717769
{txt}{space 7}niche {c |}{col 14}{res}{space 2}-1.132579{col 26}{space 2} .6527781{col 37}{space 1}   -1.74{col 46}{space 3}0.083{col 54}{space 4}-2.412001{col 67}{space 3} .1468426
{txt}{space 7}_cons {c |}{col 14}{res}{space 2}-.2216797{col 26}{space 2} .8473649{col 37}{space 1}   -0.26{col 46}{space 3}0.794{col 54}{space 4}-1.882484{col 67}{space 3} 1.439125
{txt}{hline 13}{c +}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
         rho {c |}  {res} .1686623   .0309246     5.45   0.000{col 58} .1080512    .2292733
{txt}{hline 13}{c BT}{hline 64}
Wald test of rho=0:{col 40}chi2(1) = {res}{col 50} 29.746{txt} ({res}0.000{txt})
Lagrange multiplier test of rho=0:{col 40}chi2(1) = {res}{col 50} 35.838{txt} ({res}0.000{txt})

Acceptable range for rho: {res}-1.000 < rho < 1.000


{txt}
{com}.         me_perc



{res}Marginal effect of GDP when gperc = 0 = -.13
90% CI for marginal effect when gperc = 0 = [-.31315, .05315]
95% CI for marginal effect when gperc = 0 = [-.34756, .08756]



Marginal effect of GDP when gperc = .25 = -.168
90% CI for marginal effect when gperc = .25 = [-.3462, .0102]
95% CI for marginal effect when gperc = .25 = [-.37968, .04368]



Marginal effect of GDP when gperc = .5 = -.206
90% CI for marginal effect when gperc = .5 = [-.45845, .04645]
95% CI for marginal effect when gperc = .5 = [-.50588, .09388]



Marginal effect of GDP when gperc = .75 = -.244
90% CI for marginal effect when gperc = .75 = [-.6037, .1157]
95% CI for marginal effect when gperc = .75 = [-.67128, .18328]



Marginal effect of GDP when gperc = 1 = -.282
90% CI for marginal effect when gperc = 1 = [-.7605, .1965]
95% CI for marginal effect when gperc = 1 = [-.8504, .2864]



Marginal effect of unemployment when gperc = 0 = .082
90% CI for marginal effect when gperc = 0 = [-.0203, .1843]
95% CI for marginal effect when gperc = 0 = [-.03952, .20352]



Marginal effect of unemployment when gperc = .25 = .15
90% CI for marginal effect when gperc = .25 = [.04935, .25065]
95% CI for marginal effect when gperc = .25 = [.03044, .26956]



Marginal effect of unemployment when gperc = .5 = .217
90% CI for marginal effect when gperc = .5 = [.0718, .3622]
95% CI for marginal effect when gperc = .5 = [.04452, .38948]



Marginal effect of unemployment when gperc = .75 = .285
90% CI for marginal effect when gperc = .75 = [.07875, .49125]
95% CI for marginal effect when gperc = .75 = [.04, .53]



Marginal effect of unemployment when gperc = 1 = .353
90% CI for marginal effect when gperc = 1 = [.08075, .62525]
95% CI for marginal effect when gperc = 1 = [.0296, .6764]



Marginal effect of Inflation when gperc = 0 = .056
90% CI for marginal effect when gperc = 0 = [-.05785, .16985]
95% CI for marginal effect when gperc = 0 = [-.07924, .19124]



Marginal effect of Inflation when gperc = .25 = .116
90% CI for marginal effect when gperc = .25 = [.01205, .21995]
95% CI for marginal effect when gperc = .25 = [-.00748, .23948]



Marginal effect of Inflation when gperc = .5 = .177
90% CI for marginal effect when gperc = .5 = [.0417, .3123]
95% CI for marginal effect when gperc = .5 = [.01628, .33772]



Marginal effect of Inflation when gperc = .75 = .237
90% CI for marginal effect when gperc = .75 = [.0489, .4251]
95% CI for marginal effect when gperc = .75 = [.01356, .46044]



Marginal effect of Inflation when gperc = 1 = .297
90% CI for marginal effect when gperc = 1 = [.04785, .54615]
95% CI for marginal effect when gperc = 1 = [.00104, .59296]
{txt}
{com}. restore
{txt}
{com}. 
. *** Model 3: PM & FM interactions
. preserve
{txt}
{com}.         global rhs "annual_ch_rgdppc unem_harm_monthly_lag inf_py_quarterly_lag PM PM_gdp PM_un PM_inf FM FM_gdp FM_un FM_inf pervote_tm1 ep_400_tot_tm1_dm elec_ep_400_tot_tm1_dm elec_fam_ep_400_tot_tm1_dm abs_pr niche"
{txt}
{com}.         local w "W1"
{txt}
{com}.         spatwmat using "`w'.dta", name(`w') eigenval(E_`w')


{txt}The following matrices have been created:

1. Imported non-binary weights matrix {res}W1{txt} 
   Dimension: {res}1231x1231

{txt}2. Eigenvalues matrix {res}E_W1
{txt}   Dimension: {res}1231x1


{txt}
{com}.         spatgsa ep_400_tot_dm, w(`w') m g two
{res}

{txt}{title:Measures of global spatial autocorrelation}


Weights matrix
{hline 62}
Name: {res}W1
{txt}Type: {res}Imported (non-binary)
{txt}Row-standardized: {res}No
{txt}{hline 62}

Moran's I
{hline 20}{c TT}{hline 41}
{col 11}Variables {c |}{col 26}I{col 33}E(I){col 40}sd(I){col 50}z{col 55}p-value*
{hline 20}{c +}{hline 41}
{col 1}      ep_400_tot_dm {c |}{res}{col 22}  0.175{col 30} -0.001{col 38}  0.028{col 46}  6.242{col 56}0.000
{txt}{hline 20}{c BT}{hline 41}

Geary's c
{hline 20}{c TT}{hline 41}
{col 11}Variables {c |}{col 26}c{col 33}E(c){col 40}sd(c){col 50}z{col 55}p-value*
{hline 20}{c +}{hline 41}
{col 1}      ep_400_tot_dm {c |}{res}{col 22}  0.706{col 30}  1.000{col 38}  0.050{col 46} -5.843{col 56}0.000
{txt}{hline 20}{c BT}{hline 41}
*2-tail test



{com}.         qui reg ep_400_tot_dm annual_ch_rgdppc unem_harm_monthly_lag inf_py_quarterly_lag PM PM_gdp PM_un PM_inf FM FM_gdp FM_un FM_inf pervote_tm1 ep_400_tot_tm1_dm elec_ep_400_tot_tm1_dm elec_fam_ep_400_tot_tm1_dm abs_pr niche, robust    
{txt}
{com}.         spatdiag, weights(`w')
{res}

{txt}{title:Diagnostic tests for spatial dependence in OLS regression}


Fitted model
{hline 60}
{p 0 16 24}{res}ep_400_tot_dm{txt} = {res}annual_ch_rgdppc{txt} + {res}unem_harm_monthly_lag{txt} + {res}inf_py_quarterly_lag{txt} + {res}PM{txt} + {res}PM_gdp{txt} + {res}PM_un{txt} + {res}PM_inf{txt} + {res}FM{txt} + {res}FM_gdp{txt} + {res}FM_un{txt} + {res}FM_inf{txt} + {res}pervote_tm1{txt} + {res}ep_400_tot_tm1_dm{txt} + {res}elec_ep_400_tot_tm1_dm{txt} + {res}elec_fam_ep_400_tot_tm1_dm{txt} + {res}abs_pr{txt} + {res}niche
{p_end}
{txt}{hline 60}

Weights matrix
{hline 60}
Name: {res}W1
{txt}Type: {res}Imported (non-binary)
{txt}Row-standardized: {res}No
{txt}{hline 60}

Diagnostics
{hline 31}{c TT}{hline 28}
{col 1}Test{col 32}{c |}{col 35}Statistic{col 48}df{col 53}p-value
{hline 31}{c +}{hline 28}
Spatial error:{col 32}{c |}
  Moran's I{col 32}{c |}{res}{col 35}   8.506{col 48} 1{col 54}0.000
{txt}  Lagrange multiplier{col 32}{c |}{res}{col 35}  41.547{col 48} 1{col 54}0.000
{txt}  Robust Lagrange multiplier{col 32}{c |}{res}{col 35}   5.651{col 48} 1{col 54}0.017
{txt}{col 32}{c |}
Spatial lag:{col 32}{c |}
  Lagrange multiplier{col 32}{c |}{res}{col 35}  36.051{col 48} 1{col 54}0.000
{txt}  Robust Lagrange multiplier{col 32}{c |}{res}{col 35}   0.155{col 48} 1{col 54}0.693
{txt}{hline 31}{c BT}{hline 28}



{com}.         spatreg ep_400_tot_dm $rhs, weights(`w') eigenval(E_`w') model(lag) robust 
{res}
{txt}initial:       log pseudolikelihood = {res}-4408.8411
{txt}rescale:       log pseudolikelihood = {res}-4408.8411
{txt}rescale eq:    log pseudolikelihood = {res}-4408.8411
{txt}Iteration 0:{col 16}log pseudolikelihood = {res}-4408.8411{txt}  
Iteration 1:{col 16}log pseudolikelihood = {res}-4394.3987{txt}  
Iteration 2:{col 16}log pseudolikelihood = {res}-4394.2056{txt}  
Iteration 3:{col 16}log pseudolikelihood = {res}-4394.2055{txt}  
{res}

{txt}Weights matrix
 Name: {res}W1
{txt} Type: {res}Imported (non-binary)
{txt} Row-standardized: {res}No


{txt}Spatial lag model{col 52}Number of obs{col 68}={res}      1231
{txt}{col 52}Variance ratio{col 68}={res}     0.256
{txt}{col 52}Squared corr.{col 68}={res}     0.271
{txt}Log likelihood = {res}-4394.2055{txt}{col 52}Sigma{col 68}={res}      8.55

{txt}{hline 13}{c TT}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{col 14}{c |}{col 26}    Robust
{col 1}ep_400_~t_dm{col 14}{c |}      Coef.{col 26}   Std. Err.{col 38}      z{col 46}   P>|z|{col 54}     [95% Con{col 67}f. Interval]
{hline 13}{c +}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{res}ep_400_~t_dm {txt}{c |}
annual_ch_~c {c |}{col 14}{res}{space 2}-.1365817{col 26}{space 2}  .107151{col 37}{space 1}   -1.27{col 46}{space 3}0.202{col 54}{space 4}-.3465938{col 67}{space 3} .0734303
{txt}unem_harm_~g {c |}{col 14}{res}{space 2} .0742573{col 26}{space 2} .0610637{col 37}{space 1}    1.22{col 46}{space 3}0.224{col 54}{space 4}-.0454254{col 67}{space 3}   .19394
{txt}inf_py_qua~g {c |}{col 14}{res}{space 2} .0523773{col 26}{space 2} .0676338{col 37}{space 1}    0.77{col 46}{space 3}0.439{col 54}{space 4}-.0801824{col 67}{space 3} .1849371
{txt}{space 10}PM {c |}{col 14}{res}{space 2} 1.043139{col 26}{space 2} 2.344594{col 37}{space 1}    0.44{col 46}{space 3}0.656{col 54}{space 4}-3.552181{col 67}{space 3} 5.638459
{txt}{space 6}PM_gdp {c |}{col 14}{res}{space 2} -.439736{col 26}{space 2} .4064173{col 37}{space 1}   -1.08{col 46}{space 3}0.279{col 54}{space 4}-1.236299{col 67}{space 3} .3568272
{txt}{space 7}PM_un {c |}{col 14}{res}{space 2} .0003589{col 26}{space 2} .2416689{col 37}{space 1}    0.00{col 46}{space 3}0.999{col 54}{space 4}-.4733035{col 67}{space 3} .4740213
{txt}{space 6}PM_inf {c |}{col 14}{res}{space 2}-.2944826{col 26}{space 2} .3231579{col 37}{space 1}   -0.91{col 46}{space 3}0.362{col 54}{space 4}-.9278603{col 67}{space 3} .3388952
{txt}{space 10}FM {c |}{col 14}{res}{space 2}-5.396253{col 26}{space 2}  2.24051{col 37}{space 1}   -2.41{col 46}{space 3}0.016{col 54}{space 4}-9.787572{col 67}{space 3}-1.004933
{txt}{space 6}FM_gdp {c |}{col 14}{res}{space 2}  .344575{col 26}{space 2} .3831469{col 37}{space 1}    0.90{col 46}{space 3}0.368{col 54}{space 4}-.4063792{col 67}{space 3} 1.095529
{txt}{space 7}FM_un {c |}{col 14}{res}{space 2} .3537608{col 26}{space 2} .2544134{col 37}{space 1}    1.39{col 46}{space 3}0.164{col 54}{space 4}-.1448804{col 67}{space 3} .8524019
{txt}{space 6}FM_inf {c |}{col 14}{res}{space 2}  .591628{col 26}{space 2}  .340336{col 37}{space 1}    1.74{col 46}{space 3}0.082{col 54}{space 4}-.0754183{col 67}{space 3} 1.258674
{txt}{space 1}pervote_tm1 {c |}{col 14}{res}{space 2}   .11679{col 26}{space 2} .0253631{col 37}{space 1}    4.60{col 46}{space 3}0.000{col 54}{space 4} .0670792{col 67}{space 3} .1665008
{txt}ep_400_~1_dm {c |}{col 14}{res}{space 2} .3186572{col 26}{space 2} .0313522{col 37}{space 1}   10.16{col 46}{space 3}0.000{col 54}{space 4}  .257208{col 67}{space 3} .3801064
{txt}elec_ep_40~m {c |}{col 14}{res}{space 2} .0435649{col 26}{space 2} .0478965{col 37}{space 1}    0.91{col 46}{space 3}0.363{col 54}{space 4}-.0503106{col 67}{space 3} .1374403
{txt}elec_fam_e~m {c |}{col 14}{res}{space 2}-.0951951{col 26}{space 2} .0268271{col 37}{space 1}   -3.55{col 46}{space 3}0.000{col 54}{space 4}-.1477753{col 67}{space 3}-.0426149
{txt}{space 6}abs_pr {c |}{col 14}{res}{space 2}-.1174559{col 26}{space 2} .0229414{col 37}{space 1}   -5.12{col 46}{space 3}0.000{col 54}{space 4}-.1624203{col 67}{space 3}-.0724916
{txt}{space 7}niche {c |}{col 14}{res}{space 2}-1.094641{col 26}{space 2} .6518947{col 37}{space 1}   -1.68{col 46}{space 3}0.093{col 54}{space 4}-2.372331{col 67}{space 3} .1830495
{txt}{space 7}_cons {c |}{col 14}{res}{space 2}-.1661811{col 26}{space 2} .8405303{col 37}{space 1}   -0.20{col 46}{space 3}0.843{col 54}{space 4} -1.81359{col 67}{space 3} 1.481228
{txt}{hline 13}{c +}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
         rho {c |}  {res} .1686926   .0309326     5.45   0.000{col 58} .1080658    .2293195
{txt}{hline 13}{c BT}{hline 64}
Wald test of rho=0:{col 40}chi2(1) = {res}{col 50} 29.741{txt} ({res}0.000{txt})
Lagrange multiplier test of rho=0:{col 40}chi2(1) = {res}{col 50} 36.051{txt} ({res}0.000{txt})

Acceptable range for rho: {res}-1.000 < rho < 1.000


{txt}
{com}.         me_pmfm



{res}Marginal effect of GDP for Opposition = -.137
90% CI for marginal effect for opposition = [-.31355, .03955]
95% CI for marginal effect for opposition = [-.34672, .07272]


Marginal effect of GDP for FM = .208
90% CI for marginal effect for FM = [-.41405, .83005]
95% CI for marginal effect for FM = [-.53092, .94692]


Marginal effect of GDP for PM = -.576
90% CI for marginal effect for PM = [-1.2525, .1005]
95% CI for marginal effect for PM = [-1.3796, .2276]


Marginal effect of GDP for PM/FM = -.232
90% CI for marginal effect for PM/FM = [-.7006, .2366]
95% CI for marginal effect for PM/FM = [-.78864, .32464]



Marginal effect of Unemployment for Opposition = .074
90% CI for marginal effect for opposition = [-.02665, .17465]
95% CI for marginal effect for opposition = [-.04556, .19356]


Marginal effect of Unemployment for FM = .428
90% CI for marginal effect for FM = [.00725, .84875]
95% CI for marginal effect for FM = [-.0718, .9278]


Marginal effect of Unemployment for PM = .075
90% CI for marginal effect for PM = [-.321, .471]
95% CI for marginal effect for PM = [-.3954, .5454]


Marginal effect of Unemployment for PM/FM = .428
90% CI for marginal effect for PM/FM = [.13925, .71675]
95% CI for marginal effect for PM/FM = [.085, .771]



Marginal effect of Inflation for Opposition = .052
90% CI for marginal effect for opposition = [-.0602, .1642]
95% CI for marginal effect for opposition = [-.08128, .18528]


Marginal effect of Inflation for FM = .644
90% CI for marginal effect for FM = [.0764, 1.2116]
95% CI for marginal effect for FM = [-.03024, 1.31824]


Marginal effect of Inflation for PM = -.242
90% CI for marginal effect for PM = [-.76835, .28435]
95% CI for marginal effect for PM = [-.86724, .38324]


Marginal effect of Inflation for PM/FM = .35
90% CI for marginal effect for PM/FM = [.1091, .5909]
95% CI for marginal effect for PM/FM = [.06384, .63616]
{txt}
{com}. restore
{txt}
{com}. 
. 
. ***************************************************************************************
. ********************** Replication: Additional Materials ******************************
. ***************************************************************************************
. *** Government Specification: PM & CP interactions
. preserve
{txt}
{com}.         global rhs "annual_ch_rgdppc unem_harm_monthly_lag inf_py_quarterly_lag PM PM_gdp PM_un PM_inf CP CP_gdp CP_un CP_inf pervote_tm1 ep_400_tot_tm1_dm elec_ep_400_tot_tm1_dm elec_fam_ep_400_tot_tm1_dm abs_pr niche"
{txt}
{com}.         local w "W1"
{txt}
{com}.         spatwmat using "`w'.dta", name(`w') eigenval(E_`w')


{txt}The following matrices have been created:

1. Imported non-binary weights matrix {res}W1{txt} 
   Dimension: {res}1231x1231

{txt}2. Eigenvalues matrix {res}E_W1
{txt}   Dimension: {res}1231x1


{txt}
{com}.         spatgsa ep_400_tot_dm, w(`w') m g two
{res}

{txt}{title:Measures of global spatial autocorrelation}


Weights matrix
{hline 62}
Name: {res}W1
{txt}Type: {res}Imported (non-binary)
{txt}Row-standardized: {res}No
{txt}{hline 62}

Moran's I
{hline 20}{c TT}{hline 41}
{col 11}Variables {c |}{col 26}I{col 33}E(I){col 40}sd(I){col 50}z{col 55}p-value*
{hline 20}{c +}{hline 41}
{col 1}      ep_400_tot_dm {c |}{res}{col 22}  0.175{col 30} -0.001{col 38}  0.028{col 46}  6.242{col 56}0.000
{txt}{hline 20}{c BT}{hline 41}

Geary's c
{hline 20}{c TT}{hline 41}
{col 11}Variables {c |}{col 26}c{col 33}E(c){col 40}sd(c){col 50}z{col 55}p-value*
{hline 20}{c +}{hline 41}
{col 1}      ep_400_tot_dm {c |}{res}{col 22}  0.706{col 30}  1.000{col 38}  0.050{col 46} -5.843{col 56}0.000
{txt}{hline 20}{c BT}{hline 41}
*2-tail test



{com}.         qui reg ep_400_tot_dm annual_ch_rgdppc unem_harm_monthly_lag inf_py_quarterly_lag PM PM_gdp PM_un PM_inf CP CP_gdp CP_un CP_inf pervote_tm1 ep_400_tot_tm1_dm elec_ep_400_tot_tm1_dm elec_fam_ep_400_tot_tm1_dm abs_pr niche, robust    
{txt}
{com}.         spatdiag, weights(`w')
{res}

{txt}{title:Diagnostic tests for spatial dependence in OLS regression}


Fitted model
{hline 60}
{p 0 16 24}{res}ep_400_tot_dm{txt} = {res}annual_ch_rgdppc{txt} + {res}unem_harm_monthly_lag{txt} + {res}inf_py_quarterly_lag{txt} + {res}PM{txt} + {res}PM_gdp{txt} + {res}PM_un{txt} + {res}PM_inf{txt} + {res}CP{txt} + {res}CP_gdp{txt} + {res}CP_un{txt} + {res}CP_inf{txt} + {res}pervote_tm1{txt} + {res}ep_400_tot_tm1_dm{txt} + {res}elec_ep_400_tot_tm1_dm{txt} + {res}elec_fam_ep_400_tot_tm1_dm{txt} + {res}abs_pr{txt} + {res}niche
{p_end}
{txt}{hline 60}

Weights matrix
{hline 60}
Name: {res}W1
{txt}Type: {res}Imported (non-binary)
{txt}Row-standardized: {res}No
{txt}{hline 60}

Diagnostics
{hline 31}{c TT}{hline 28}
{col 1}Test{col 32}{c |}{col 35}Statistic{col 48}df{col 53}p-value
{hline 31}{c +}{hline 28}
Spatial error:{col 32}{c |}
  Moran's I{col 32}{c |}{res}{col 35}   8.474{col 48} 1{col 54}0.000
{txt}  Lagrange multiplier{col 32}{c |}{res}{col 35}  40.778{col 48} 1{col 54}0.000
{txt}  Robust Lagrange multiplier{col 32}{c |}{res}{col 35}   6.536{col 48} 1{col 54}0.011
{txt}{col 32}{c |}
Spatial lag:{col 32}{c |}
  Lagrange multiplier{col 32}{c |}{res}{col 35}  34.533{col 48} 1{col 54}0.000
{txt}  Robust Lagrange multiplier{col 32}{c |}{res}{col 35}   0.290{col 48} 1{col 54}0.590
{txt}{hline 31}{c BT}{hline 28}



{com}.         spatreg ep_400_tot_dm $rhs, weights(`w') eigenval(E_`w') model(lag) robust 
{res}
{txt}initial:       log pseudolikelihood = {res}-4406.2933
{txt}rescale:       log pseudolikelihood = {res}-4406.2933
{txt}rescale eq:    log pseudolikelihood = {res}-4406.2933
{txt}Iteration 0:{col 16}log pseudolikelihood = {res}-4406.2933{txt}  
Iteration 1:{col 16}log pseudolikelihood = {res}-4392.3568{txt}  
Iteration 2:{col 16}log pseudolikelihood = {res}-4392.1796{txt}  
Iteration 3:{col 16}log pseudolikelihood = {res}-4392.1795{txt}  
{res}

{txt}Weights matrix
 Name: {res}W1
{txt} Type: {res}Imported (non-binary)
{txt} Row-standardized: {res}No


{txt}Spatial lag model{col 52}Number of obs{col 68}={res}      1231
{txt}{col 52}Variance ratio{col 68}={res}     0.259
{txt}{col 52}Squared corr.{col 68}={res}     0.273
{txt}Log likelihood = {res}-4392.1795{txt}{col 52}Sigma{col 68}={res}      8.54

{txt}{hline 13}{c TT}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{col 14}{c |}{col 26}    Robust
{col 1}ep_400_~t_dm{col 14}{c |}      Coef.{col 26}   Std. Err.{col 38}      z{col 46}   P>|z|{col 54}     [95% Con{col 67}f. Interval]
{hline 13}{c +}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{res}ep_400_~t_dm {txt}{c |}
annual_ch_~c {c |}{col 14}{res}{space 2}-.1445425{col 26}{space 2} .1134485{col 37}{space 1}   -1.27{col 46}{space 3}0.203{col 54}{space 4}-.3668975{col 67}{space 3} .0778126
{txt}unem_harm_~g {c |}{col 14}{res}{space 2} .0667344{col 26}{space 2} .0626903{col 37}{space 1}    1.06{col 46}{space 3}0.287{col 54}{space 4}-.0561363{col 67}{space 3}  .189605
{txt}inf_py_qua~g {c |}{col 14}{res}{space 2} .0281836{col 26}{space 2}  .070491{col 37}{space 1}    0.40{col 46}{space 3}0.689{col 54}{space 4}-.1099764{col 67}{space 3} .1663435
{txt}{space 10}PM {c |}{col 14}{res}{space 2}-2.254774{col 26}{space 2} 1.990526{col 37}{space 1}   -1.13{col 46}{space 3}0.257{col 54}{space 4}-6.156134{col 67}{space 3} 1.646586
{txt}{space 6}PM_gdp {c |}{col 14}{res}{space 2}-.2774944{col 26}{space 2} .3058241{col 37}{space 1}   -0.91{col 46}{space 3}0.364{col 54}{space 4}-.8768986{col 67}{space 3} .3219098
{txt}{space 7}PM_un {c |}{col 14}{res}{space 2} .2287012{col 26}{space 2} .1696889{col 37}{space 1}    1.35{col 46}{space 3}0.178{col 54}{space 4}-.1038829{col 67}{space 3} .5612853
{txt}{space 6}PM_inf {c |}{col 14}{res}{space 2} .1972897{col 26}{space 2} .1556372{col 37}{space 1}    1.27{col 46}{space 3}0.205{col 54}{space 4}-.1077535{col 67}{space 3}  .502333
{txt}{space 10}CP {c |}{col 14}{res}{space 2}-1.387758{col 26}{space 2} 2.006807{col 37}{space 1}   -0.69{col 46}{space 3}0.489{col 54}{space 4}-5.321028{col 67}{space 3} 2.545512
{txt}{space 6}CP_gdp {c |}{col 14}{res}{space 2} .2301178{col 26}{space 2} .2697187{col 37}{space 1}    0.85{col 46}{space 3}0.394{col 54}{space 4}-.2985212{col 67}{space 3} .7587567
{txt}{space 7}CP_un {c |}{col 14}{res}{space 2} .2331533{col 26}{space 2} .2179128{col 37}{space 1}    1.07{col 46}{space 3}0.285{col 54}{space 4}-.1939479{col 67}{space 3} .6602545
{txt}{space 6}CP_inf {c |}{col 14}{res}{space 2} .2966972{col 26}{space 2} .2160509{col 37}{space 1}    1.37{col 46}{space 3}0.170{col 54}{space 4}-.1267547{col 67}{space 3} .7201492
{txt}{space 1}pervote_tm1 {c |}{col 14}{res}{space 2} .1182405{col 26}{space 2} .0246495{col 37}{space 1}    4.80{col 46}{space 3}0.000{col 54}{space 4} .0699284{col 67}{space 3} .1665526
{txt}ep_400_~1_dm {c |}{col 14}{res}{space 2} .3151777{col 26}{space 2} .0311578{col 37}{space 1}   10.12{col 46}{space 3}0.000{col 54}{space 4} .2541095{col 67}{space 3}  .376246
{txt}elec_ep_40~m {c |}{col 14}{res}{space 2} .0587913{col 26}{space 2} .0479802{col 37}{space 1}    1.23{col 46}{space 3}0.220{col 54}{space 4}-.0352481{col 67}{space 3} .1528307
{txt}elec_fam_e~m {c |}{col 14}{res}{space 2}-.0975852{col 26}{space 2} .0265579{col 37}{space 1}   -3.67{col 46}{space 3}0.000{col 54}{space 4}-.1496377{col 67}{space 3}-.0455327
{txt}{space 6}abs_pr {c |}{col 14}{res}{space 2}-.1193396{col 26}{space 2} .0231193{col 37}{space 1}   -5.16{col 46}{space 3}0.000{col 54}{space 4}-.1646525{col 67}{space 3}-.0740267
{txt}{space 7}niche {c |}{col 14}{res}{space 2}-.8347992{col 26}{space 2} .6523377{col 37}{space 1}   -1.28{col 46}{space 3}0.201{col 54}{space 4}-2.113358{col 67}{space 3} .4437592
{txt}{space 7}_cons {c |}{col 14}{res}{space 2}-.3896152{col 26}{space 2} .8779512{col 37}{space 1}   -0.44{col 46}{space 3}0.657{col 54}{space 4}-2.110368{col 67}{space 3} 1.331138
{txt}{hline 13}{c +}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
         rho {c |}  {res} .1657259   .0309901     5.35   0.000{col 58} .1049864    .2264655
{txt}{hline 13}{c BT}{hline 64}
Wald test of rho=0:{col 40}chi2(1) = {res}{col 50} 28.598{txt} ({res}0.000{txt})
Lagrange multiplier test of rho=0:{col 40}chi2(1) = {res}{col 50} 34.533{txt} ({res}0.000{txt})

Acceptable range for rho: {res}-1.000 < rho < 1.000


{txt}
{com}.         me_pmcp



{res}Marginal effect of GDP for Opposition = -.145
90% CI for marginal effect for opposition = [-.33145, .04145]
95% CI for marginal effect for opposition = [-.36648, .07648]


Marginal effect of GDP for Government (Non-PM) = .086
90% CI for marginal effect for government (Non-PM) = [-.32155, .49355]
95% CI for marginal effect for government (Non-PM) = [-.39812, .57012]


Marginal effect of GDP for PM = -.422
90% CI for marginal effect for PM = [-.89885, .05485]
95% CI for marginal effect for PM = [-.98844, .14444]

{p 0 7}{space 1}{text:( 1)}{space 1} [ep_400_tot_dm]CP_gdp = 0{p_end}

{txt}{col 12}chi2(  1) ={res}    0.73
{txt}{col 10}Prob > chi2 =  {res}  0.3936

{p 0 7}{space 1}{text:( 1)}{space 1} [ep_400_tot_dm]PM_gdp = 0{p_end}

{txt}{col 12}chi2(  1) ={res}    0.82
{txt}{col 10}Prob > chi2 =  {res}  0.3642

{p 0 7}{space 1}{text:( 1)}{space 1} [ep_400_tot_dm]PM_gdp - [ep_400_tot_dm]CP_gdp = 0{p_end}

{txt}{col 12}chi2(  1) ={res}    1.79
{txt}{col 10}Prob > chi2 =  {res}  0.1812



Marginal effect of Unemployment for Opposition = .067
90% CI for marginal effect for opposition = [-.03695, .17095]
95% CI for marginal effect for opposition = [-.05648, .19048]


Marginal effect of Unemployment for Government (Non-PM) = .3
90% CI for marginal effect for government (Non-PM) = [-.0465, .6465]
95% CI for marginal effect for government (Non-PM) = [-.1116, .7116]


Marginal effect of Unemployment for PM = .295
90% CI for marginal effect for PM = [.03265, .55735]
95% CI for marginal effect for PM = [-.01664, .60664]

{p 0 7}{space 1}{text:( 1)}{space 1} [ep_400_tot_dm]CP_un = 0{p_end}

{txt}{col 12}chi2(  1) ={res}    1.14
{txt}{col 10}Prob > chi2 =  {res}  0.2846

{p 0 7}{space 1}{text:( 1)}{space 1} [ep_400_tot_dm]PM_un = 0{p_end}

{txt}{col 12}chi2(  1) ={res}    1.82
{txt}{col 10}Prob > chi2 =  {res}  0.1777

{p 0 7}{space 1}{text:( 1)}{space 1}{space 1}{res}- [ep_400_tot_dm]PM_un + [ep_400_tot_dm]CP_un = 0{p_end}

{txt}{col 12}chi2(  1) ={res}    0.00
{txt}{col 10}Prob > chi2 =  {res}  0.9864



Marginal effect of Inflation for Opposition = .028
90% CI for marginal effect for opposition = [-.0875, .1435]
95% CI for marginal effect for opposition = [-.1092, .1652]


Marginal effect of Inflation for Government (Non-PM) = .325
90% CI for marginal effect for government (Non-PM) = [-.01325, .66325]
95% CI for marginal effect for government (Non-PM) = [-.0768, .7268]


Marginal effect of Inflation for PM = .225
90% CI for marginal effect for PM = [-.00435, .45435]
95% CI for marginal effect for PM = [-.04744, .49744]

{p 0 7}{space 1}{text:( 1)}{space 1} [ep_400_tot_dm]CP_inf = 0{p_end}

{txt}{col 12}chi2(  1) ={res}    1.89
{txt}{col 10}Prob > chi2 =  {res}  0.1697

{p 0 7}{space 1}{text:( 1)}{space 1} [ep_400_tot_dm]PM_inf = 0{p_end}

{txt}{col 12}chi2(  1) ={res}    1.61
{txt}{col 10}Prob > chi2 =  {res}  0.2049

{p 0 7}{space 1}{text:( 1)}{space 1}{space 1}{res}- [ep_400_tot_dm]PM_inf + [ep_400_tot_dm]CP_inf = 0{p_end}

{txt}{col 12}chi2(  1) ={res}    0.16
{txt}{col 10}Prob > chi2 =  {res}  0.6871
{txt}
{com}. restore
{txt}
{com}. 
. *** Directional Models
. *** Model 1: G interactions
. preserve
{txt}
{com}.         qui reg shift_t annual_ch_rgdppc unem_harm_monthly_lag inf_py_quarterly_lag G G_gdp G_un G_inf pervote_tm1 shift_tm1 abs_rile_tm1 niche, robust 
{txt}
{com}.         keep if e(sample)
{txt}(137 observations deleted)

{com}.         global rhs "annual_ch_rgdppc unem_harm_monthly_lag inf_py_quarterly_lag G G_gdp G_un G_inf pervote_tm1 shift_tm1 abs_rile_tm1 niche"
{txt}
{com}.         local w "W2"
{txt}
{com}.         spatwmat using "`w'.dta", name(`w') eigenval(E_`w')


{txt}The following matrices have been created:

1. Imported non-binary weights matrix {res}W2{txt} 
   Dimension: {res}1094x1094

{txt}2. Eigenvalues matrix {res}E_W2
{txt}   Dimension: {res}1094x1


{txt}
{com}.         spatgsa shift_t, w(`w') m g two
{res}

{txt}{title:Measures of global spatial autocorrelation}


Weights matrix
{hline 62}
Name: {res}W2
{txt}Type: {res}Imported (non-binary)
{txt}Row-standardized: {res}No
{txt}{hline 62}

Moran's I
{hline 20}{c TT}{hline 41}
{col 11}Variables {c |}{col 26}I{col 33}E(I){col 40}sd(I){col 50}z{col 55}p-value*
{hline 20}{c +}{hline 41}
{col 1}            shift_t {c |}{res}{col 22}  0.062{col 30} -0.001{col 38}  0.031{col 46}  2.014{col 56}0.044
{txt}{hline 20}{c BT}{hline 41}

Geary's c
{hline 20}{c TT}{hline 41}
{col 11}Variables {c |}{col 26}c{col 33}E(c){col 40}sd(c){col 50}z{col 55}p-value*
{hline 20}{c +}{hline 41}
{col 1}            shift_t {c |}{res}{col 22}  0.750{col 30}  1.000{col 38}  0.061{col 46} -4.108{col 56}0.000
{txt}{hline 20}{c BT}{hline 41}
*2-tail test



{com}.         qui reg shift_t annual_ch_rgdppc unem_harm_monthly_lag inf_py_quarterly_lag G G_gdp G_un G_inf pervote_tm1 shift_tm1 abs_rile_tm1 niche, robust 
{txt}
{com}.         spatdiag, weights(`w')
{res}

{txt}{title:Diagnostic tests for spatial dependence in OLS regression}


Fitted model
{hline 60}
{p 0 10 24}{res}shift_t{txt} = {res}annual_ch_rgdppc{txt} + {res}unem_harm_monthly_lag{txt} + {res}inf_py_quarterly_lag{txt} + {res}G{txt} + {res}G_gdp{txt} + {res}G_un{txt} + {res}G_inf{txt} + {res}pervote_tm1{txt} + {res}shift_tm1{txt} + {res}abs_rile_tm1{txt} + {res}niche
{p_end}
{txt}{hline 60}

Weights matrix
{hline 60}
Name: {res}W2
{txt}Type: {res}Imported (non-binary)
{txt}Row-standardized: {res}No
{txt}{hline 60}

Diagnostics
{hline 31}{c TT}{hline 28}
{col 1}Test{col 32}{c |}{col 35}Statistic{col 48}df{col 53}p-value
{hline 31}{c +}{hline 28}
Spatial error:{col 32}{c |}
  Moran's I{col 32}{c |}{res}{col 35}   2.293{col 48} 1{col 54}0.022
{txt}  Lagrange multiplier{col 32}{c |}{res}{col 35}   2.174{col 48} 1{col 54}0.140
{txt}  Robust Lagrange multiplier{col 32}{c |}{res}{col 35}   0.000{col 48} 1{col 54}0.990
{txt}{col 32}{c |}
Spatial lag:{col 32}{c |}
  Lagrange multiplier{col 32}{c |}{res}{col 35}   2.282{col 48} 1{col 54}0.131
{txt}  Robust Lagrange multiplier{col 32}{c |}{res}{col 35}   0.108{col 48} 1{col 54}0.743
{txt}{hline 31}{c BT}{hline 28}



{com}.         spatreg shift_t $rhs, weights(`w') eigenval(E_`w') model(lag) robust 
{res}
{txt}initial:       log pseudolikelihood = {res}-4612.5564
{txt}rescale:       log pseudolikelihood = {res}-4612.5564
{txt}rescale eq:    log pseudolikelihood = {res}-4612.5564
{txt}Iteration 0:{col 16}log pseudolikelihood = {res}-4612.5564{txt}  
Iteration 1:{col 16}log pseudolikelihood = {res}-4611.5301{txt}  
Iteration 2:{col 16}log pseudolikelihood = {res}-4611.5295{txt}  
Iteration 3:{col 16}log pseudolikelihood = {res}-4611.5295{txt}  
{res}

{txt}Weights matrix
 Name: {res}W2
{txt} Type: {res}Imported (non-binary)
{txt} Row-standardized: {res}No


{txt}Spatial lag model{col 52}Number of obs{col 68}={res}      1094
{txt}{col 52}Variance ratio{col 68}={res}     0.079
{txt}{col 52}Squared corr.{col 68}={res}     0.081
{txt}Log likelihood = {res}-4611.5295{txt}{col 52}Sigma{col 68}={res}     16.38

{txt}{hline 13}{c TT}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{col 14}{c |}{col 26}    Robust
{col 1}     shift_t{col 14}{c |}      Coef.{col 26}   Std. Err.{col 38}      z{col 46}   P>|z|{col 54}     [95% Con{col 67}f. Interval]
{hline 13}{c +}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{res}shift_t      {txt}{c |}
annual_ch_~c {c |}{col 14}{res}{space 2}-.1737142{col 26}{space 2} .2846393{col 37}{space 1}   -0.61{col 46}{space 3}0.542{col 54}{space 4}-.7315969{col 67}{space 3} .3841685
{txt}unem_harm_~g {c |}{col 14}{res}{space 2} .3002712{col 26}{space 2} .1286238{col 37}{space 1}    2.33{col 46}{space 3}0.020{col 54}{space 4} .0481731{col 67}{space 3} .5523693
{txt}inf_py_qua~g {c |}{col 14}{res}{space 2} .2595661{col 26}{space 2} .1582859{col 37}{space 1}    1.64{col 46}{space 3}0.101{col 54}{space 4}-.0506687{col 67}{space 3} .5698008
{txt}{space 11}G {c |}{col 14}{res}{space 2} 8.232281{col 26}{space 2} 2.978132{col 37}{space 1}    2.76{col 46}{space 3}0.006{col 54}{space 4} 2.395248{col 67}{space 3} 14.06931
{txt}{space 7}G_gdp {c |}{col 14}{res}{space 2} .3273931{col 26}{space 2}   .45561{col 37}{space 1}    0.72{col 46}{space 3}0.472{col 54}{space 4} -.565586{col 67}{space 3} 1.220372
{txt}{space 8}G_un {c |}{col 14}{res}{space 2}-.6203446{col 26}{space 2} .2854144{col 37}{space 1}   -2.17{col 46}{space 3}0.030{col 54}{space 4}-1.179747{col 67}{space 3}-.0609426
{txt}{space 7}G_inf {c |}{col 14}{res}{space 2}-.6405883{col 26}{space 2} .2601011{col 37}{space 1}   -2.46{col 46}{space 3}0.014{col 54}{space 4}-1.150377{col 67}{space 3}-.1307994
{txt}{space 1}pervote_tm1 {c |}{col 14}{res}{space 2} .0336995{col 26}{space 2} .0373766{col 37}{space 1}    0.90{col 46}{space 3}0.367{col 54}{space 4}-.0395573{col 67}{space 3} .1069564
{txt}{space 3}shift_tm1 {c |}{col 14}{res}{space 2}-.0964258{col 26}{space 2} .0488365{col 37}{space 1}   -1.97{col 46}{space 3}0.048{col 54}{space 4}-.1921435{col 67}{space 3}-.0007081
{txt}abs_rile_tm1 {c |}{col 14}{res}{space 2} .2842594{col 26}{space 2} .0520642{col 37}{space 1}    5.46{col 46}{space 3}0.000{col 54}{space 4} .1822155{col 67}{space 3} .3863034
{txt}{space 7}niche {c |}{col 14}{res}{space 2}-3.247528{col 26}{space 2} 1.474908{col 37}{space 1}   -2.20{col 46}{space 3}0.028{col 54}{space 4}-6.138293{col 67}{space 3}-.3567622
{txt}{space 7}_cons {c |}{col 14}{res}{space 2}-5.828175{col 26}{space 2} 1.841176{col 37}{space 1}   -3.17{col 46}{space 3}0.002{col 54}{space 4}-9.436814{col 67}{space 3}-2.219536
{txt}{hline 13}{c +}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
         rho {c |}  {res} .0545339    .042341     1.29   0.198{col 58}-.0284529    .1375207
{txt}{hline 13}{c BT}{hline 64}
Wald test of rho=0:{col 40}chi2(1) = {res}{col 50}  1.659{txt} ({res}0.198{txt})
Lagrange multiplier test of rho=0:{col 40}chi2(1) = {res}{col 50}  2.282{txt} ({res}0.131{txt})

Acceptable range for rho: {res}-1.000 < rho < 1.000


{txt}
{com}.         me_g


{res}The marginal effect for GDP is -.1737142

The 95% confidence interval is -.73160714       and             .38417875

The 90% confidence interval is -.64336897    and      .29594058

G =       0



The marginal effect for GDP is .15367891

The 95% confidence interval is -.54796878       and             .8553266

The 90% confidence interval is -.43699389    and      .74435171

G =       1



The marginal effect for unemployment is .30027119

The 95% confidence interval is .04816849       and             .5523739

The 90% confidence interval is .08804188    and      .51250051

G =       0



The marginal effect for unemployment is -.32007339

The 95% confidence interval is -.82100635       and             .18085957

The 90% confidence interval is -.74177716    and      .10163038

G =       1



The marginal effect for inflation is .25956605

The 95% confidence interval is -.05067439       and             .56980649

The 90% confidence interval is -.00160574    and      .52073785

G =       0



The marginal effect for inflation is -.38102223

The 95% confidence interval is -.78633494       and             .02429048

The 90% confidence interval is -.72222936    and      -.0398151

G =       1

{txt}
{com}. restore
{txt}
{com}. 
. *** Model 2: Government percentage interactions
. preserve
{txt}
{com}.         qui reg shift_t annual_ch_rgdppc unem_harm_monthly_lag inf_py_quarterly_lag G G_gdp G_un G_inf pervote_tm1 shift_tm1 abs_rile_tm1 niche, robust 
{txt}
{com}.         keep if e(sample)
{txt}(137 observations deleted)

{com}.         global rhs "annual_ch_rgdppc unem_harm_monthly_lag inf_py_quarterly_lag Gperc Gperc_gdp Gperc_un Gperc_inf pervote_tm1 shift_tm1 abs_rile_tm1 niche"
{txt}
{com}.         local w "W2"
{txt}
{com}.         spatwmat using "`w'.dta", name(`w') eigenval(E_`w')


{txt}The following matrices have been created:

1. Imported non-binary weights matrix {res}W2{txt} 
   Dimension: {res}1094x1094

{txt}2. Eigenvalues matrix {res}E_W2
{txt}   Dimension: {res}1094x1


{txt}
{com}.         spatgsa shift_t, w(`w') m g two
{res}

{txt}{title:Measures of global spatial autocorrelation}


Weights matrix
{hline 62}
Name: {res}W2
{txt}Type: {res}Imported (non-binary)
{txt}Row-standardized: {res}No
{txt}{hline 62}

Moran's I
{hline 20}{c TT}{hline 41}
{col 11}Variables {c |}{col 26}I{col 33}E(I){col 40}sd(I){col 50}z{col 55}p-value*
{hline 20}{c +}{hline 41}
{col 1}            shift_t {c |}{res}{col 22}  0.062{col 30} -0.001{col 38}  0.031{col 46}  2.014{col 56}0.044
{txt}{hline 20}{c BT}{hline 41}

Geary's c
{hline 20}{c TT}{hline 41}
{col 11}Variables {c |}{col 26}c{col 33}E(c){col 40}sd(c){col 50}z{col 55}p-value*
{hline 20}{c +}{hline 41}
{col 1}            shift_t {c |}{res}{col 22}  0.750{col 30}  1.000{col 38}  0.061{col 46} -4.108{col 56}0.000
{txt}{hline 20}{c BT}{hline 41}
*2-tail test



{com}.         qui reg shift_t annual_ch_rgdppc unem_harm_monthly_lag inf_py_quarterly_lag Gperc Gperc_gdp Gperc_un Gperc_inf pervote_tm1 shift_tm1 abs_rile_tm1 niche, robust 
{txt}
{com}.         spatdiag, weights(`w')
{res}

{txt}{title:Diagnostic tests for spatial dependence in OLS regression}


Fitted model
{hline 60}
{p 0 10 24}{res}shift_t{txt} = {res}annual_ch_rgdppc{txt} + {res}unem_harm_monthly_lag{txt} + {res}inf_py_quarterly_lag{txt} + {res}Gperc{txt} + {res}Gperc_gdp{txt} + {res}Gperc_un{txt} + {res}Gperc_inf{txt} + {res}pervote_tm1{txt} + {res}shift_tm1{txt} + {res}abs_rile_tm1{txt} + {res}niche
{p_end}
{txt}{hline 60}

Weights matrix
{hline 60}
Name: {res}W2
{txt}Type: {res}Imported (non-binary)
{txt}Row-standardized: {res}No
{txt}{hline 60}

Diagnostics
{hline 31}{c TT}{hline 28}
{col 1}Test{col 32}{c |}{col 35}Statistic{col 48}df{col 53}p-value
{hline 31}{c +}{hline 28}
Spatial error:{col 32}{c |}
  Moran's I{col 32}{c |}{res}{col 35}   2.359{col 48} 1{col 54}0.018
{txt}  Lagrange multiplier{col 32}{c |}{res}{col 35}   2.359{col 48} 1{col 54}0.125
{txt}  Robust Lagrange multiplier{col 32}{c |}{res}{col 35}   0.001{col 48} 1{col 54}0.971
{txt}{col 32}{c |}
Spatial lag:{col 32}{c |}
  Lagrange multiplier{col 32}{c |}{res}{col 35}   2.439{col 48} 1{col 54}0.118
{txt}  Robust Lagrange multiplier{col 32}{c |}{res}{col 35}   0.082{col 48} 1{col 54}0.775
{txt}{hline 31}{c BT}{hline 28}



{com}.         spatreg shift_t $rhs, weights(`w') eigenval(E_`w') model(lag) robust 
{res}
{txt}initial:       log pseudolikelihood = {res}-4611.5548
{txt}rescale:       log pseudolikelihood = {res}-4611.5548
{txt}rescale eq:    log pseudolikelihood = {res}-4611.5548
{txt}Iteration 0:{col 16}log pseudolikelihood = {res}-4611.5548{txt}  
Iteration 1:{col 16}log pseudolikelihood = {res}-4610.4639{txt}  
Iteration 2:{col 16}log pseudolikelihood = {res}-4610.4631{txt}  
Iteration 3:{col 16}log pseudolikelihood = {res}-4610.4631{txt}  
{res}

{txt}Weights matrix
 Name: {res}W2
{txt} Type: {res}Imported (non-binary)
{txt} Row-standardized: {res}No


{txt}Spatial lag model{col 52}Number of obs{col 68}={res}      1094
{txt}{col 52}Variance ratio{col 68}={res}     0.080
{txt}{col 52}Squared corr.{col 68}={res}     0.083
{txt}Log likelihood = {res}-4610.4631{txt}{col 52}Sigma{col 68}={res}     16.36

{txt}{hline 13}{c TT}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{col 14}{c |}{col 26}    Robust
{col 1}     shift_t{col 14}{c |}      Coef.{col 26}   Std. Err.{col 38}      z{col 46}   P>|z|{col 54}     [95% Con{col 67}f. Interval]
{hline 13}{c +}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{res}shift_t      {txt}{c |}
annual_ch_~c {c |}{col 14}{res}{space 2}-.2046942{col 26}{space 2} .2628244{col 37}{space 1}   -0.78{col 46}{space 3}0.436{col 54}{space 4}-.7198206{col 67}{space 3} .3104322
{txt}unem_harm_~g {c |}{col 14}{res}{space 2} .2960929{col 26}{space 2} .1275273{col 37}{space 1}    2.32{col 46}{space 3}0.020{col 54}{space 4} .0461439{col 67}{space 3} .5460419
{txt}inf_py_qua~g {c |}{col 14}{res}{space 2} .1907182{col 26}{space 2} .1472903{col 37}{space 1}    1.29{col 46}{space 3}0.195{col 54}{space 4}-.0979654{col 67}{space 3} .4794019
{txt}{space 7}Gperc {c |}{col 14}{res}{space 2} 12.32398{col 26}{space 2} 3.786945{col 37}{space 1}    3.25{col 46}{space 3}0.001{col 54}{space 4} 4.901701{col 67}{space 3} 19.74625
{txt}{space 3}Gperc_gdp {c |}{col 14}{res}{space 2} .5688218{col 26}{space 2}  .582422{col 37}{space 1}    0.98{col 46}{space 3}0.329{col 54}{space 4}-.5727044{col 67}{space 3} 1.710348
{txt}{space 4}Gperc_un {c |}{col 14}{res}{space 2}-.9803464{col 26}{space 2} .3258787{col 37}{space 1}   -3.01{col 46}{space 3}0.003{col 54}{space 4}-1.619057{col 67}{space 3}-.3416359
{txt}{space 3}Gperc_inf {c |}{col 14}{res}{space 2}-.7194665{col 26}{space 2} .3085458{col 37}{space 1}   -2.33{col 46}{space 3}0.020{col 54}{space 4}-1.324205{col 67}{space 3}-.1147278
{txt}{space 1}pervote_tm1 {c |}{col 14}{res}{space 2}-.0016723{col 26}{space 2} .0481906{col 37}{space 1}   -0.03{col 46}{space 3}0.972{col 54}{space 4}-.0961241{col 67}{space 3} .0927795
{txt}{space 3}shift_tm1 {c |}{col 14}{res}{space 2}-.0982693{col 26}{space 2} .0490299{col 37}{space 1}   -2.00{col 46}{space 3}0.045{col 54}{space 4}-.1943662{col 67}{space 3}-.0021725
{txt}abs_rile_tm1 {c |}{col 14}{res}{space 2} .2804047{col 26}{space 2} .0519321{col 37}{space 1}    5.40{col 46}{space 3}0.000{col 54}{space 4} .1786196{col 67}{space 3} .3821899
{txt}{space 7}niche {c |}{col 14}{res}{space 2}-3.418577{col 26}{space 2} 1.472095{col 37}{space 1}   -2.32{col 46}{space 3}0.020{col 54}{space 4}-6.303829{col 67}{space 3}-.5333239
{txt}{space 7}_cons {c |}{col 14}{res}{space 2}-4.762686{col 26}{space 2} 1.776034{col 37}{space 1}   -2.68{col 46}{space 3}0.007{col 54}{space 4}-8.243649{col 67}{space 3}-1.281723
{txt}{hline 13}{c +}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
         rho {c |}  {res} .0562118   .0422906     1.33   0.184{col 58}-.0266761    .1390998
{txt}{hline 13}{c BT}{hline 64}
Wald test of rho=0:{col 40}chi2(1) = {res}{col 50}  1.767{txt} ({res}0.184{txt})
Lagrange multiplier test of rho=0:{col 40}chi2(1) = {res}{col 50}  2.439{txt} ({res}0.118{txt})

Acceptable range for rho: {res}-1.000 < rho < 1.000


{txt}
{com}.         me_perc



{res}Marginal effect of GDP when gperc = 0 = -.205
90% CI for marginal effect when gperc = 0 = [-.63895, .22895]
95% CI for marginal effect when gperc = 0 = [-.72048, .31048]



Marginal effect of GDP when gperc = .25 = -.062
90% CI for marginal effect when gperc = .25 = [-.4316, .3076]
95% CI for marginal effect when gperc = .25 = [-.50104, .37704]



Marginal effect of GDP when gperc = .5 = .08
90% CI for marginal effect when gperc = .5 = [-.3688, .5288]
95% CI for marginal effect when gperc = .5 = [-.45312, .61312]



Marginal effect of GDP when gperc = .75 = .222
90% CI for marginal effect when gperc = .75 = [-.3951, .8391]
95% CI for marginal effect when gperc = .75 = [-.51104, .95504]



Marginal effect of GDP when gperc = 1 = .364
90% CI for marginal effect when gperc = 1 = [-.4577, 1.1857]
95% CI for marginal effect when gperc = 1 = [-.61208, 1.34008]



Marginal effect of unemployment when gperc = 0 = .296
90% CI for marginal effect when gperc = 0 = [.0848, .5072]
95% CI for marginal effect when gperc = 0 = [.04512, .54688]



Marginal effect of unemployment when gperc = .25 = .051
90% CI for marginal effect when gperc = .25 = [-.1503, .2523]
95% CI for marginal effect when gperc = .25 = [-.18812, .29012]



Marginal effect of unemployment when gperc = .5 = -.194
90% CI for marginal effect when gperc = .5 = [-.46295, .07495]
95% CI for marginal effect when gperc = .5 = [-.51348, .12548]



Marginal effect of unemployment when gperc = .75 = -.439
90% CI for marginal effect when gperc = .75 = [-.8152, -.0628]
95% CI for marginal effect when gperc = .75 = [-.88588, .00788]



Marginal effect of unemployment when gperc = 1 = -.684
90% CI for marginal effect when gperc = 1 = [-1.179, -.189]
95% CI for marginal effect when gperc = 1 = [-1.272, -.096]



Marginal effect of Inflation when gperc = 0 = .191
90% CI for marginal effect when gperc = 0 = [-.05155, .43355]
95% CI for marginal effect when gperc = 0 = [-.09712, .47912]



Marginal effect of Inflation when gperc = .25 = .011
90% CI for marginal effect when gperc = .25 = [-.1969, .2189]
95% CI for marginal effect when gperc = .25 = [-.23596, .25796]



Marginal effect of Inflation when gperc = .5 = -.169
90% CI for marginal effect when gperc = .5 = [-.4132, .0752]
95% CI for marginal effect when gperc = .5 = [-.45908, .12108]



Marginal effect of Inflation when gperc = .75 = -.349
90% CI for marginal effect when gperc = .75 = [-.679, -.019]
95% CI for marginal effect when gperc = .75 = [-.741, .043]



Marginal effect of Inflation when gperc = 1 = -.529
90% CI for marginal effect when gperc = 1 = [-.9646, -.0934]
95% CI for marginal effect when gperc = 1 = [-1.04644, -.01156]
{txt}
{com}. restore
{txt}
{com}. 
. *** Model 3: PM & FM interactions
. preserve
{txt}
{com}.         qui reg shift_t annual_ch_rgdppc unem_harm_monthly_lag inf_py_quarterly_lag G G_gdp G_un G_inf pervote_tm1 shift_tm1 abs_rile_tm1 niche, robust 
{txt}
{com}.         keep if e(sample)
{txt}(137 observations deleted)

{com}.         global rhs "annual_ch_rgdppc unem_harm_monthly_lag inf_py_quarterly_lag PM PM_gdp PM_un PM_inf FM FM_gdp FM_un FM_inf pervote_tm1 shift_tm1 abs_rile_tm1 niche"
{txt}
{com}.         local w "W2"
{txt}
{com}.         spatwmat using "`w'.dta", name(`w') eigenval(E_`w')


{txt}The following matrices have been created:

1. Imported non-binary weights matrix {res}W2{txt} 
   Dimension: {res}1094x1094

{txt}2. Eigenvalues matrix {res}E_W2
{txt}   Dimension: {res}1094x1


{txt}
{com}.         spatgsa shift_t, w(`w') m g two
{res}

{txt}{title:Measures of global spatial autocorrelation}


Weights matrix
{hline 62}
Name: {res}W2
{txt}Type: {res}Imported (non-binary)
{txt}Row-standardized: {res}No
{txt}{hline 62}

Moran's I
{hline 20}{c TT}{hline 41}
{col 11}Variables {c |}{col 26}I{col 33}E(I){col 40}sd(I){col 50}z{col 55}p-value*
{hline 20}{c +}{hline 41}
{col 1}            shift_t {c |}{res}{col 22}  0.062{col 30} -0.001{col 38}  0.031{col 46}  2.014{col 56}0.044
{txt}{hline 20}{c BT}{hline 41}

Geary's c
{hline 20}{c TT}{hline 41}
{col 11}Variables {c |}{col 26}c{col 33}E(c){col 40}sd(c){col 50}z{col 55}p-value*
{hline 20}{c +}{hline 41}
{col 1}            shift_t {c |}{res}{col 22}  0.750{col 30}  1.000{col 38}  0.061{col 46} -4.108{col 56}0.000
{txt}{hline 20}{c BT}{hline 41}
*2-tail test



{com}.         qui reg shift_t annual_ch_rgdppc unem_harm_monthly_lag inf_py_quarterly_lag PM PM_gdp PM_un PM_inf FM FM_gdp FM_un FM_inf pervote_tm1 shift_tm1 abs_rile_tm1 niche, robust      
{txt}
{com}.         spatdiag, weights(`w')
{res}

{txt}{title:Diagnostic tests for spatial dependence in OLS regression}


Fitted model
{hline 60}
{p 0 10 24}{res}shift_t{txt} = {res}annual_ch_rgdppc{txt} + {res}unem_harm_monthly_lag{txt} + {res}inf_py_quarterly_lag{txt} + {res}PM{txt} + {res}PM_gdp{txt} + {res}PM_un{txt} + {res}PM_inf{txt} + {res}FM{txt} + {res}FM_gdp{txt} + {res}FM_un{txt} + {res}FM_inf{txt} + {res}pervote_tm1{txt} + {res}shift_tm1{txt} + {res}abs_rile_tm1{txt} + {res}niche
{p_end}
{txt}{hline 60}

Weights matrix
{hline 60}
Name: {res}W2
{txt}Type: {res}Imported (non-binary)
{txt}Row-standardized: {res}No
{txt}{hline 60}

Diagnostics
{hline 31}{c TT}{hline 28}
{col 1}Test{col 32}{c |}{col 35}Statistic{col 48}df{col 53}p-value
{hline 31}{c +}{hline 28}
Spatial error:{col 32}{c |}
  Moran's I{col 32}{c |}{res}{col 35}   2.314{col 48} 1{col 54}0.021
{txt}  Lagrange multiplier{col 32}{c |}{res}{col 35}   2.310{col 48} 1{col 54}0.129
{txt}  Robust Lagrange multiplier{col 32}{c |}{res}{col 35}   0.007{col 48} 1{col 54}0.933
{txt}{col 32}{c |}
Spatial lag:{col 32}{c |}
  Lagrange multiplier{col 32}{c |}{res}{col 35}   2.473{col 48} 1{col 54}0.116
{txt}  Robust Lagrange multiplier{col 32}{c |}{res}{col 35}   0.170{col 48} 1{col 54}0.680
{txt}{hline 31}{c BT}{hline 28}



{com}.         spatreg shift_t $rhs, weights(`w') eigenval(E_`w') model(lag) robust 
{res}
{txt}initial:       log pseudolikelihood = {res}-4606.5069
{txt}rescale:       log pseudolikelihood = {res}-4606.5069
{txt}rescale eq:    log pseudolikelihood = {res}-4606.5069
{txt}Iteration 0:{col 16}log pseudolikelihood = {res}-4606.5069{txt}  
Iteration 1:{col 16}log pseudolikelihood = {res}-4605.3777{txt}  
Iteration 2:{col 16}log pseudolikelihood = {res}-4605.3767{txt}  
Iteration 3:{col 16}log pseudolikelihood = {res}-4605.3767{txt}  
{res}

{txt}Weights matrix
 Name: {res}W2
{txt} Type: {res}Imported (non-binary)
{txt} Row-standardized: {res}No


{txt}Spatial lag model{col 52}Number of obs{col 68}={res}      1094
{txt}{col 52}Variance ratio{col 68}={res}     0.089
{txt}{col 52}Squared corr.{col 68}={res}     0.091
{txt}Log likelihood = {res}-4605.3767{txt}{col 52}Sigma{col 68}={res}     16.28

{txt}{hline 13}{c TT}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{col 14}{c |}{col 26}    Robust
{col 1}     shift_t{col 14}{c |}      Coef.{col 26}   Std. Err.{col 38}      z{col 46}   P>|z|{col 54}     [95% Con{col 67}f. Interval]
{hline 13}{c +}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{res}shift_t      {txt}{c |}
annual_ch_~c {c |}{col 14}{res}{space 2}-.1641607{col 26}{space 2} .2590494{col 37}{space 1}   -0.63{col 46}{space 3}0.526{col 54}{space 4}-.6718881{col 67}{space 3} .3435668
{txt}unem_harm_~g {c |}{col 14}{res}{space 2} .3055123{col 26}{space 2}  .128541{col 37}{space 1}    2.38{col 46}{space 3}0.017{col 54}{space 4} .0535765{col 67}{space 3} .5574481
{txt}inf_py_qua~g {c |}{col 14}{res}{space 2} .1916971{col 26}{space 2} .1462564{col 37}{space 1}    1.31{col 46}{space 3}0.190{col 54}{space 4}-.0949602{col 67}{space 3} .4783544
{txt}{space 10}PM {c |}{col 14}{res}{space 2}  8.73294{col 26}{space 2} 5.064494{col 37}{space 1}    1.72{col 46}{space 3}0.085{col 54}{space 4}-1.193286{col 67}{space 3} 18.65917
{txt}{space 6}PM_gdp {c |}{col 14}{res}{space 2} .0772795{col 26}{space 2} .7373505{col 37}{space 1}    0.10{col 46}{space 3}0.917{col 54}{space 4}-1.367901{col 67}{space 3}  1.52246
{txt}{space 7}PM_un {c |}{col 14}{res}{space 2} -.710803{col 26}{space 2} .5631553{col 37}{space 1}   -1.26{col 46}{space 3}0.207{col 54}{space 4}-1.814567{col 67}{space 3}  .392961
{txt}{space 6}PM_inf {c |}{col 14}{res}{space 2} .3405029{col 26}{space 2} .4534105{col 37}{space 1}    0.75{col 46}{space 3}0.453{col 54}{space 4}-.5481653{col 67}{space 3} 1.229171
{txt}{space 10}FM {c |}{col 14}{res}{space 2} 5.928501{col 26}{space 2} 4.866353{col 37}{space 1}    1.22{col 46}{space 3}0.223{col 54}{space 4}-3.609376{col 67}{space 3} 15.46638
{txt}{space 6}FM_gdp {c |}{col 14}{res}{space 2} .3064992{col 26}{space 2}  .859637{col 37}{space 1}    0.36{col 46}{space 3}0.721{col 54}{space 4}-1.378358{col 67}{space 3} 1.991357
{txt}{space 7}FM_un {c |}{col 14}{res}{space 2}-.3935656{col 26}{space 2} .5574924{col 37}{space 1}   -0.71{col 46}{space 3}0.480{col 54}{space 4}-1.486231{col 67}{space 3} .6990995
{txt}{space 6}FM_inf {c |}{col 14}{res}{space 2} -1.12775{col 26}{space 2} .4656566{col 37}{space 1}   -2.42{col 46}{space 3}0.015{col 54}{space 4} -2.04042{col 67}{space 3}-.2150799
{txt}{space 1}pervote_tm1 {c |}{col 14}{res}{space 2}-.0262359{col 26}{space 2} .0473656{col 37}{space 1}   -0.55{col 46}{space 3}0.580{col 54}{space 4}-.1190709{col 67}{space 3}  .066599
{txt}{space 3}shift_tm1 {c |}{col 14}{res}{space 2}  -.10007{col 26}{space 2} .0480896{col 37}{space 1}   -2.08{col 46}{space 3}0.037{col 54}{space 4} -.194324{col 67}{space 3}-.0058161
{txt}abs_rile_tm1 {c |}{col 14}{res}{space 2}  .280698{col 26}{space 2} .0516052{col 37}{space 1}    5.44{col 46}{space 3}0.000{col 54}{space 4} .1795537{col 67}{space 3} .3818423
{txt}{space 7}niche {c |}{col 14}{res}{space 2}-3.443896{col 26}{space 2} 1.476395{col 37}{space 1}   -2.33{col 46}{space 3}0.020{col 54}{space 4}-6.337576{col 67}{space 3}-.5502149
{txt}{space 7}_cons {c |}{col 14}{res}{space 2}-4.667049{col 26}{space 2} 1.781752{col 37}{space 1}   -2.62{col 46}{space 3}0.009{col 54}{space 4}-8.159218{col 67}{space 3} -1.17488
{txt}{hline 13}{c +}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
         rho {c |}  {res} .0564373   .0424255     1.33   0.183{col 58}-.0267151    .1395897
{txt}{hline 13}{c BT}{hline 64}
Wald test of rho=0:{col 40}chi2(1) = {res}{col 50}  1.770{txt} ({res}0.183{txt})
Lagrange multiplier test of rho=0:{col 40}chi2(1) = {res}{col 50}  2.473{txt} ({res}0.116{txt})

Acceptable range for rho: {res}-1.000 < rho < 1.000


{txt}
{com}.         me_pmfm



{res}Marginal effect of GDP for Opposition = -.164
90% CI for marginal effect for opposition = [-.59135, .26335]
95% CI for marginal effect for opposition = [-.67164, .34364]


Marginal effect of GDP for FM = .142
90% CI for marginal effect for FM = [-1.3133, 1.5973]
95% CI for marginal effect for FM = [-1.58672, 1.87072]


Marginal effect of GDP for PM = -.087
90% CI for marginal effect for PM = [-1.2486, 1.0746]
95% CI for marginal effect for PM = [-1.46684, 1.29284]


Marginal effect of GDP for PM/FM = .22
90% CI for marginal effect for PM/FM = [-.605, 1.045]
95% CI for marginal effect for PM/FM = [-.76, 1.2]



Marginal effect of Unemployment for Opposition = .306
90% CI for marginal effect for opposition = [.09315, .51885]
95% CI for marginal effect for opposition = [.05316, .55884]


Marginal effect of Unemployment for FM = -.088
90% CI for marginal effect for FM = [-1.0054, .8294]
95% CI for marginal effect for FM = [-1.17776, 1.00176]


Marginal effect of Unemployment for PM = -.405
90% CI for marginal effect for PM = [-1.33395, .52395]
95% CI for marginal effect for PM = [-1.50848, .69848]


Marginal effect of Unemployment for PM/FM = -.799
90% CI for marginal effect for PM/FM = [-1.28575, -.31225]
95% CI for marginal effect for PM/FM = [-1.3772, -.2208]



Marginal effect of Inflation for Opposition = .192
90% CI for marginal effect for opposition = [-.0489, .4329]
95% CI for marginal effect for opposition = [-.09416, .47816]


Marginal effect of Inflation for FM = -.936
90% CI for marginal effect for FM = [-1.70985, -.16215]
95% CI for marginal effect for FM = [-1.85524, -.01676]


Marginal effect of Inflation for PM = .532
90% CI for marginal effect for PM = [-.2039, 1.2679]
95% CI for marginal effect for PM = [-.34216, 1.40616]


Marginal effect of Inflation for PM/FM = -.596
90% CI for marginal effect for PM/FM = [-1.03325, -.15875]
95% CI for marginal effect for PM/FM = [-1.1154, -.0766]
{txt}
{com}. restore
{txt}
{com}. 
. ***************************************************************************************
. ********************** Substantive Effects ********************************************
. ***************************************************************************************
. *** Marginal effect of a 1-standard deviation increase (+3.834%) in unemployment for the G.
. use "Williams Seki and Whitten.dta", clear
{txt}
{com}. 
. cap gen cons = 1
{txt}
{com}. 
. global rhs "annual_ch_rgdppc unem_harm_monthly_lag inf_py_quarterly_lag G G_gdp G_un G_inf pervote_tm1 ep_400_tot_tm1_dm elec_ep_400_tot_tm1_dm elec_fam_ep_400_tot_tm1_dm abs_pr niche"
{txt}
{com}. qui reg ep_400_tot_dm $rhs, robust
{txt}
{com}. keep if e(sample)
{txt}(0 observations deleted)

{com}. local w "W1"
{txt}
{com}. 
. preserve
{txt}
{com}.         clear
{txt}
{com}.         insheet using "b_W1.csv", comma
{txt}(16 vars, 1 obs)

{com}.         mkmat b1-b14, matrix(b)
{res}{txt}
{com}.         mkmat b15, matrix(rho)
{res}{txt}
{com}.         local rho = rho[1,1]
{txt}
{com}.         matrix B = b'
{txt}
{com}.         mat list b
{res}
{txt}b[1,14]
            b1          b2          b3          b4          b5          b6          b7
r1 {res}  -.1419058    .0585411    .0294912   -1.586699   -.0569827      .25285     .236552

{txt}            b8          b9         b10         b11         b12         b13         b14
r1 {res}   .0866326   .31848249    .0537966   -.0985255   -.1171007  -.91683352    .0206569
{reset}
{com}.         mat list B
{res}
{txt}B[14,1]
             r1
 b1 {res}  -.1419058
{txt} b2 {res}   .0585411
{txt} b3 {res}   .0294912
{txt} b4 {res}  -1.586699
{txt} b5 {res}  -.0569827
{txt} b6 {res}     .25285
{txt} b7 {res}    .236552
{txt} b8 {res}   .0866326
{txt} b9 {res}  .31848249
{txt}b10 {res}   .0537966
{txt}b11 {res}  -.0985255
{txt}b12 {res}  -.1171007
{txt}b13 {res} -.91683352
{txt}b14 {res}   .0206569
{reset}
{com}.         mat list rho
{res}
{txt}symmetric rho[1,1]
          b15
r1 {res} .16637629
{reset}
{com}. restore
{txt}
{com}. 
. local nobs = 5  
{txt}
{com}. matrix eye = I(`nobs')
{txt}
{com}.         
. * Create the weights matrix (left to right): 
. * 1 = far-left, 2 = moderate-left, 3 = center, 4 = moderate-right, 5 = far-right
. * first number refers to row, second number refers to column
. 
. keep in 1/`nobs'
{txt}(1226 observations deleted)

{com}. replace new_rile = -40 in 1
{txt}(1 real change made)

{com}. replace new_rile = -15 in 2
{txt}(1 real change made)

{com}. replace new_rile = 0 in 3
{txt}(1 real change made)

{com}. replace new_rile = 15 in 4
{txt}(1 real change made)

{com}. replace new_rile = 40 in 5
{txt}(1 real change made)

{com}.         
. mkmat new_rile, matrix(r)
{res}{txt}
{com}.         
. scalar w_1_2 = 1/abs(r[2,1]-r[1,1])
{txt}
{com}. scalar w_1_3 = 1/abs(r[3,1]-r[1,1])
{txt}
{com}. scalar w_1_4 = 1/abs(r[4,1]-r[1,1])
{txt}
{com}. scalar w_1_5 = 1/abs(r[5,1]-r[1,1])
{txt}
{com}. 
. scalar w_2_1 = 1/abs(r[1,1]-r[2,1])
{txt}
{com}. scalar w_2_3 = 1/abs(r[3,1]-r[2,1])
{txt}
{com}. scalar w_2_4 = 1/abs(r[4,1]-r[2,1])
{txt}
{com}. scalar w_2_5 = 1/abs(r[5,1]-r[2,1])
{txt}
{com}. 
. scalar w_3_1 = 1/abs(r[1,1]-r[3,1])
{txt}
{com}. scalar w_3_2 = 1/abs(r[2,1]-r[3,1])
{txt}
{com}. scalar w_3_4 = 1/abs(r[4,1]-r[3,1])
{txt}
{com}. scalar w_3_5 = 1/abs(r[5,1]-r[3,1])
{txt}
{com}. 
. scalar w_4_1 = 1/abs(r[1,1]-r[4,1])
{txt}
{com}. scalar w_4_2 = 1/abs(r[2,1]-r[4,1])
{txt}
{com}. scalar w_4_3 = 1/abs(r[3,1]-r[4,1])
{txt}
{com}. scalar w_4_5 = 1/abs(r[5,1]-r[4,1])
{txt}
{com}. 
. scalar w_5_1 = 1/abs(r[1,1]-r[5,1])
{txt}
{com}. scalar w_5_2 = 1/abs(r[2,1]-r[5,1])
{txt}
{com}. scalar w_5_3 = 1/abs(r[3,1]-r[5,1])
{txt}
{com}. scalar w_5_4 = 1/abs(r[4,1]-r[5,1])
{txt}
{com}.         
. mat W = (0, w_1_2, w_1_3, w_1_4, w_1_5 \ w_2_1, 0, w_2_3, w_2_4, w_2_5 \ w_3_1, w_3_2, 0, w_3_4, w_3_5 \ w_4_1, w_4_2, w_4_3, 0, w_4_5 \ w_5_1, w_5_2, w_5_3, w_5_4, 0)
{txt}
{com}. mat list W
{res}
{txt}symmetric W[5,5]
           c1         c2         c3         c4         c5
r1 {res}         0
{txt}r2 {res}       .04          0
{txt}r3 {res}      .025  .06666667          0
{txt}r4 {res} .01818182  .03333333  .06666667          0
{txt}r5 {res}     .0125  .01818182       .025        .04          0
{reset}
{com}.         
. matrix est = eye - `rho'*W
{txt}
{com}. matrix invest = inv(est)
{txt}
{com}. 
. *** First scenario      
. preserve        
{txt}
{com}.         matrix XB = (-1 \ -10 \ 1.194 \ -10 \ -1)
{txt}
{com}.         mat list XB
{res}
{txt}XB[5,1]
       c1
r1 {res}    -1
{txt}r2 {res}   -10
{txt}r3 {res} 1.194
{txt}r4 {res}   -10
{txt}r5 {res}    -1
{reset}
{com}. 
.         matrix y_hat = invest*XB
{txt}
{com}.         svmat y_hat
{txt}
{com}.         list new_rile y_hat
{txt}
     {c TLC}{hline 10}{c -}{hline 11}{c TRC}
     {c |} {res}new_rile      y_hat1 {txt}{c |}
     {c LT}{hline 10}{c -}{hline 11}{c RT}
  1. {c |} {res}     -40   -1.095618 {txt}{c |}
  2. {c |} {res}     -15   -10.05571 {txt}{c |}
  3. {c |} {res}       0    .9618149 {txt}{c |}
  4. {c |} {res}      15   -10.05571 {txt}{c |}
  5. {c |} {res}      40   -1.095618 {txt}{c |}
     {c BLC}{hline 10}{c -}{hline 11}{c BRC}

{com}.         keep new_rile y_hat1
{txt}
{com}.         keep in 1/5 
{txt}(0 observations deleted)

{com}.         sort new_rile
{txt}
{com}.         tempfile s1
{txt}
{com}.         save `s1', replace
{txt}(note: file C:\Users\WILLIA~1\AppData\Local\Temp\ST_0g000027.tmp not found)
file C:\Users\WILLIA~1\AppData\Local\Temp\ST_0g000027.tmp saved

{com}. restore
{txt}
{com}. 
. *** Second scenario     
. preserve        
{txt}
{com}.         matrix XB = (-1 \ -3 \ 1.194 \ -3 \ -1)
{txt}
{com}.         mat list XB
{res}
{txt}XB[5,1]
       c1
r1 {res}    -1
{txt}r2 {res}    -3
{txt}r3 {res} 1.194
{txt}r4 {res}    -3
{txt}r5 {res}    -1
{reset}
{com}. 
.         matrix y_hat = invest*XB
{txt}
{com}.         svmat y_hat
{txt}
{com}.         list new_rile y_hat
{txt}
     {c TLC}{hline 10}{c -}{hline 11}{c TRC}
     {c |} {res}new_rile      y_hat1 {txt}{c |}
     {c LT}{hline 10}{c -}{hline 11}{c RT}
  1. {c |} {res}     -40   -1.026661 {txt}{c |}
  2. {c |} {res}     -15   -3.014248 {txt}{c |}
  3. {c |} {res}       0    1.118593 {txt}{c |}
  4. {c |} {res}      15   -3.014248 {txt}{c |}
  5. {c |} {res}      40   -1.026661 {txt}{c |}
     {c BLC}{hline 10}{c -}{hline 11}{c BRC}

{com}.         rename y_hat1 y_hat2
{txt}
{com}.         keep new_rile y_hat2
{txt}
{com}.         keep in 1/5 
{txt}(0 observations deleted)

{com}.         sort new_rile
{txt}
{com}.         tempfile s2
{txt}
{com}.         save `s2', replace      
{txt}(note: file C:\Users\WILLIA~1\AppData\Local\Temp\ST_0g000029.tmp not found)
file C:\Users\WILLIA~1\AppData\Local\Temp\ST_0g000029.tmp saved

{com}. restore
{txt}
{com}. 
. *** Third scenario      
. preserve        
{txt}
{com}.         matrix XB = (0 \ 0 \ 1.194 \ 0 \ 0)
{txt}
{com}.         mat list XB
{res}
{txt}XB[5,1]
       c1
r1 {res}     0
{txt}r2 {res}     0
{txt}r3 {res} 1.194
{txt}r4 {res}     0
{txt}r5 {res}     0
{reset}
{com}. 
.         matrix y_hat = invest*XB
{txt}
{com}.         svmat y_hat
{txt}
{com}.         list new_rile y_hat
{txt}
     {c TLC}{hline 10}{c -}{hline 10}{c TRC}
     {c |} {res}new_rile     y_hat1 {txt}{c |}
     {c LT}{hline 10}{c -}{hline 10}{c RT}
  1. {c |} {res}     -40   .0051078 {txt}{c |}
  2. {c |} {res}     -15   .0133709 {txt}{c |}
  3. {c |} {res}       0   1.194339 {txt}{c |}
  4. {c |} {res}      15   .0133709 {txt}{c |}
  5. {c |} {res}      40   .0051078 {txt}{c |}
     {c BLC}{hline 10}{c -}{hline 10}{c BRC}

{com}.         rename y_hat1 y_hat3
{txt}
{com}.         keep new_rile y_hat3
{txt}
{com}.         keep in 1/5 
{txt}(0 observations deleted)

{com}.         sort new_rile   
{txt}
{com}.         tempfile s3
{txt}
{com}.         save `s3', replace              
{txt}(note: file C:\Users\WILLIA~1\AppData\Local\Temp\ST_0g00002b.tmp not found)
file C:\Users\WILLIA~1\AppData\Local\Temp\ST_0g00002b.tmp saved

{com}. restore 
{txt}
{com}. 
. *** Fourth scenario     
. preserve        
{txt}
{com}.         matrix XB = (-1 \ 3 \ 1.194 \ 3 \ -1)
{txt}
{com}.         mat list XB
{res}
{txt}XB[5,1]
       c1
r1 {res}    -1
{txt}r2 {res}     3
{txt}r3 {res} 1.194
{txt}r4 {res}     3
{txt}r5 {res}    -1
{reset}
{com}. 
.         matrix y_hat = invest*XB
{txt}
{com}.         svmat y_hat
{txt}
{com}.         list new_rile y_hat
{txt}
     {c TLC}{hline 10}{c -}{hline 11}{c TRC}
     {c |} {res}new_rile      y_hat1 {txt}{c |}
     {c LT}{hline 10}{c -}{hline 11}{c RT}
  1. {c |} {res}     -40   -.9675543 {txt}{c |}
  2. {c |} {res}     -15    3.021287 {txt}{c |}
  3. {c |} {res}       0    1.252974 {txt}{c |}
  4. {c |} {res}      15    3.021287 {txt}{c |}
  5. {c |} {res}      40   -.9675543 {txt}{c |}
     {c BLC}{hline 10}{c -}{hline 11}{c BRC}

{com}.         rename y_hat1 y_hat4
{txt}
{com}.         keep new_rile y_hat4
{txt}
{com}.         keep in 1/5 
{txt}(0 observations deleted)

{com}.         sort new_rile   
{txt}
{com}.         tempfile s4
{txt}
{com}.         save `s4', replace              
{txt}(note: file C:\Users\WILLIA~1\AppData\Local\Temp\ST_0g00002d.tmp not found)
file C:\Users\WILLIA~1\AppData\Local\Temp\ST_0g00002d.tmp saved

{com}. restore 
{txt}
{com}. 
. *** Fifth scenario      
. preserve        
{txt}
{com}.         matrix XB = (-1 \ 10 \ 1.194 \ 10 \ -1)
{txt}
{com}.         mat list XB
{res}
{txt}XB[5,1]
       c1
r1 {res}    -1
{txt}r2 {res}    10
{txt}r3 {res} 1.194
{txt}r4 {res}    10
{txt}r5 {res}    -1
{reset}
{com}. 
.         matrix y_hat = invest*XB
{txt}
{com}.         svmat y_hat
{txt}
{com}.         list new_rile y_hat
{txt}
     {c TLC}{hline 10}{c -}{hline 11}{c TRC}
     {c |} {res}new_rile      y_hat1 {txt}{c |}
     {c LT}{hline 10}{c -}{hline 11}{c RT}
  1. {c |} {res}     -40   -.8985969 {txt}{c |}
  2. {c |} {res}     -15    10.06275 {txt}{c |}
  3. {c |} {res}       0    1.409752 {txt}{c |}
  4. {c |} {res}      15    10.06275 {txt}{c |}
  5. {c |} {res}      40   -.8985969 {txt}{c |}
     {c BLC}{hline 10}{c -}{hline 11}{c BRC}

{com}.         rename y_hat1 y_hat5
{txt}
{com}.         keep new_rile y_hat5
{txt}
{com}.         keep in 1/5 
{txt}(0 observations deleted)

{com}.         sort new_rile   
{txt}
{com}.         tempfile s5
{txt}
{com}.         save `s5', replace              
{txt}(note: file C:\Users\WILLIA~1\AppData\Local\Temp\ST_0g00002f.tmp not found)
file C:\Users\WILLIA~1\AppData\Local\Temp\ST_0g00002f.tmp saved

{com}. restore 
{txt}
{com}. 
. *** Put it all together
. preserve
{txt}
{com}.         use `s1', clear
{txt}
{com}.         sort new_rile 
{txt}
{com}. 
.         merge new_rile using `s2', sort
{txt}{p}
(note: you are using old
{bf:merge} syntax; see
{bf:{help merge:[D] merge}} for new syntax)
{p_end}

{com}.         drop _merge
{txt}
{com}. 
.         merge new_rile using `s3', sort
{txt}{p}
(note: you are using old
{bf:merge} syntax; see
{bf:{help merge:[D] merge}} for new syntax)
{p_end}

{com}.         drop _merge
{txt}
{com}. 
.         merge new_rile using `s4', sort
{txt}{p}
(note: you are using old
{bf:merge} syntax; see
{bf:{help merge:[D] merge}} for new syntax)
{p_end}

{com}.         drop _merge
{txt}
{com}. 
.         merge new_rile using `s5', sort
{txt}{p}
(note: you are using old
{bf:merge} syntax; see
{bf:{help merge:[D] merge}} for new syntax)
{p_end}

{com}.         drop _merge
{txt}
{com}. 
.         gen me = .
{txt}(5 missing values generated)

{com}.         foreach i of numlist 1(1)5 {c -(}
{txt}  2{com}.                 qui sum y_hat`i' in 3
{txt}  3{com}.                 qui replace me = r(mean) in `i' 
{txt}  4{com}.         {c )-}
{txt}
{com}. 
.         egen v = fill(1(1)5)
{txt}
{com}. 
.         outsheet using "ME_un1.csv", comma replace
{txt}
{com}. restore
{txt}
{com}. 
. 
. *** First scenario      
. preserve        
{txt}
{com}.         matrix XB = (-10 \ -1 \ 1.194 \ -1 \ -10)
{txt}
{com}.         mat list XB
{res}
{txt}XB[5,1]
       c1
r1 {res}   -10
{txt}r2 {res}    -1
{txt}r3 {res} 1.194
{txt}r4 {res}    -1
{txt}r5 {res}   -10
{reset}
{com}. 
.         matrix y_hat = invest*XB
{txt}
{com}.         svmat y_hat
{txt}
{com}.         list new_rile y_hat
{txt}
     {c TLC}{hline 10}{c -}{hline 11}{c TRC}
     {c |} {res}new_rile      y_hat1 {txt}{c |}
     {c LT}{hline 10}{c -}{hline 11}{c RT}
  1. {c |} {res}     -40    -10.0269 {txt}{c |}
  2. {c |} {res}     -15   -1.091062 {txt}{c |}
  3. {c |} {res}       0    1.086385 {txt}{c |}
  4. {c |} {res}      15   -1.091062 {txt}{c |}
  5. {c |} {res}      40    -10.0269 {txt}{c |}
     {c BLC}{hline 10}{c -}{hline 11}{c BRC}

{com}.         keep new_rile y_hat1
{txt}
{com}.         keep in 1/5 
{txt}(0 observations deleted)

{com}.         sort new_rile
{txt}
{com}.         tempfile s1
{txt}
{com}.         save `s1', replace
{txt}(note: file C:\Users\WILLIA~1\AppData\Local\Temp\ST_0g00002i.tmp not found)
file C:\Users\WILLIA~1\AppData\Local\Temp\ST_0g00002i.tmp saved

{com}. restore
{txt}
{com}. 
. *** Second scenario     
. preserve        
{txt}
{com}.         matrix XB = (-3 \ -1 \ 1.194 \ -1 \ -3)
{txt}
{com}.         mat list XB
{res}
{txt}XB[5,1]
       c1
r1 {res}    -3
{txt}r2 {res}    -1
{txt}r3 {res} 1.194
{txt}r4 {res}    -1
{txt}r5 {res}    -3
{reset}
{com}. 
.         matrix y_hat = invest*XB
{txt}
{com}.         svmat y_hat
{txt}
{com}.         list new_rile y_hat
{txt}
     {c TLC}{hline 10}{c -}{hline 11}{c TRC}
     {c |} {res}new_rile      y_hat1 {txt}{c |}
     {c LT}{hline 10}{c -}{hline 11}{c RT}
  1. {c |} {res}     -40   -3.011389 {txt}{c |}
  2. {c |} {res}     -15   -1.022105 {txt}{c |}
  3. {c |} {res}       0    1.146275 {txt}{c |}
  4. {c |} {res}      15   -1.022105 {txt}{c |}
  5. {c |} {res}      40   -3.011389 {txt}{c |}
     {c BLC}{hline 10}{c -}{hline 11}{c BRC}

{com}.         rename y_hat1 y_hat2
{txt}
{com}.         keep new_rile y_hat2
{txt}
{com}.         keep in 1/5 
{txt}(0 observations deleted)

{com}.         sort new_rile
{txt}
{com}.         tempfile s2
{txt}
{com}.         save `s2', replace      
{txt}(note: file C:\Users\WILLIA~1\AppData\Local\Temp\ST_0g00002k.tmp not found)
file C:\Users\WILLIA~1\AppData\Local\Temp\ST_0g00002k.tmp saved

{com}. restore
{txt}
{com}. 
. *** Third scenario      
. preserve        
{txt}
{com}.         matrix XB = (0 \ 0 \ 1.194 \ 0 \ 0)
{txt}
{com}.         mat list XB
{res}
{txt}XB[5,1]
       c1
r1 {res}     0
{txt}r2 {res}     0
{txt}r3 {res} 1.194
{txt}r4 {res}     0
{txt}r5 {res}     0
{reset}
{com}. 
.         matrix y_hat = invest*XB
{txt}
{com}.         svmat y_hat
{txt}
{com}.         list new_rile y_hat
{txt}
     {c TLC}{hline 10}{c -}{hline 10}{c TRC}
     {c |} {res}new_rile     y_hat1 {txt}{c |}
     {c LT}{hline 10}{c -}{hline 10}{c RT}
  1. {c |} {res}     -40   .0051078 {txt}{c |}
  2. {c |} {res}     -15   .0133709 {txt}{c |}
  3. {c |} {res}       0   1.194339 {txt}{c |}
  4. {c |} {res}      15   .0133709 {txt}{c |}
  5. {c |} {res}      40   .0051078 {txt}{c |}
     {c BLC}{hline 10}{c -}{hline 10}{c BRC}

{com}.         rename y_hat1 y_hat3
{txt}
{com}.         keep new_rile y_hat3
{txt}
{com}.         keep in 1/5 
{txt}(0 observations deleted)

{com}.         sort new_rile   
{txt}
{com}.         tempfile s3
{txt}
{com}.         save `s3', replace              
{txt}(note: file C:\Users\WILLIA~1\AppData\Local\Temp\ST_0g00002m.tmp not found)
file C:\Users\WILLIA~1\AppData\Local\Temp\ST_0g00002m.tmp saved

{com}. restore 
{txt}
{com}. 
. *** Fourth scenario     
. preserve        
{txt}
{com}.         matrix XB = (3 \ -1 \ 1.194 \ -1 \ 3)
{txt}
{com}.         mat list XB
{res}
{txt}XB[5,1]
       c1
r1 {res}     3
{txt}r2 {res}    -1
{txt}r3 {res} 1.194
{txt}r4 {res}    -1
{txt}r5 {res}     3
{reset}
{com}. 
.         matrix y_hat = invest*XB
{txt}
{com}.         svmat y_hat
{txt}
{com}.         list new_rile y_hat
{txt}
     {c TLC}{hline 10}{c -}{hline 11}{c TRC}
     {c |} {res}new_rile      y_hat1 {txt}{c |}
     {c LT}{hline 10}{c -}{hline 11}{c RT}
  1. {c |} {res}     -40    3.001903 {txt}{c |}
  2. {c |} {res}     -15   -.9629984 {txt}{c |}
  3. {c |} {res}       0     1.19761 {txt}{c |}
  4. {c |} {res}      15   -.9629984 {txt}{c |}
  5. {c |} {res}      40    3.001903 {txt}{c |}
     {c BLC}{hline 10}{c -}{hline 11}{c BRC}

{com}.         rename y_hat1 y_hat4
{txt}
{com}.         keep new_rile y_hat4
{txt}
{com}.         keep in 1/5 
{txt}(0 observations deleted)

{com}.         sort new_rile   
{txt}
{com}.         tempfile s4
{txt}
{com}.         save `s4', replace              
{txt}(note: file C:\Users\WILLIA~1\AppData\Local\Temp\ST_0g00002o.tmp not found)
file C:\Users\WILLIA~1\AppData\Local\Temp\ST_0g00002o.tmp saved

{com}. restore 
{txt}
{com}. 
. *** Fifth scenario      
. preserve        
{txt}
{com}.         matrix XB = (10 \ -1 \ 1.194 \ -1 \ 10)
{txt}
{com}.         mat list XB
{res}
{txt}XB[5,1]
       c1
r1 {res}    10
{txt}r2 {res}    -1
{txt}r3 {res} 1.194
{txt}r4 {res}    -1
{txt}r5 {res}    10
{reset}
{com}. 
.         matrix y_hat = invest*XB
{txt}
{com}.         svmat y_hat
{txt}
{com}.         list new_rile y_hat
{txt}
     {c TLC}{hline 10}{c -}{hline 11}{c TRC}
     {c |} {res}new_rile      y_hat1 {txt}{c |}
     {c LT}{hline 10}{c -}{hline 11}{c RT}
  1. {c |} {res}     -40    10.01741 {txt}{c |}
  2. {c |} {res}     -15   -.8940411 {txt}{c |}
  3. {c |} {res}       0      1.2575 {txt}{c |}
  4. {c |} {res}      15   -.8940411 {txt}{c |}
  5. {c |} {res}      40    10.01741 {txt}{c |}
     {c BLC}{hline 10}{c -}{hline 11}{c BRC}

{com}.         rename y_hat1 y_hat5
{txt}
{com}.         keep new_rile y_hat5
{txt}
{com}.         keep in 1/5 
{txt}(0 observations deleted)

{com}.         sort new_rile   
{txt}
{com}.         tempfile s5
{txt}
{com}.         save `s5', replace              
{txt}(note: file C:\Users\WILLIA~1\AppData\Local\Temp\ST_0g00002q.tmp not found)
file C:\Users\WILLIA~1\AppData\Local\Temp\ST_0g00002q.tmp saved

{com}. restore 
{txt}
{com}. 
. preserve
{txt}
{com}.         *** Put it all together
.         use `s1', clear
{txt}
{com}.         sort new_rile 
{txt}
{com}. 
.         merge new_rile using `s2', sort
{txt}{p}
(note: you are using old
{bf:merge} syntax; see
{bf:{help merge:[D] merge}} for new syntax)
{p_end}

{com}.         drop _merge
{txt}
{com}. 
.         merge new_rile using `s3', sort
{txt}{p}
(note: you are using old
{bf:merge} syntax; see
{bf:{help merge:[D] merge}} for new syntax)
{p_end}

{com}.         drop _merge
{txt}
{com}. 
.         merge new_rile using `s4', sort
{txt}{p}
(note: you are using old
{bf:merge} syntax; see
{bf:{help merge:[D] merge}} for new syntax)
{p_end}

{com}.         drop _merge
{txt}
{com}. 
.         merge new_rile using `s5', sort
{txt}{p}
(note: you are using old
{bf:merge} syntax; see
{bf:{help merge:[D] merge}} for new syntax)
{p_end}

{com}.         drop _merge
{txt}
{com}. 
.         gen me = .
{txt}(5 missing values generated)

{com}.         foreach i of numlist 1(1)5 {c -(}
{txt}  2{com}.                 qui sum y_hat`i' in 3
{txt}  3{com}.                 qui replace me = r(mean) in `i'         
{txt}  4{com}.         {c )-}
{txt}
{com}. 
.         egen v = fill(1(1)5)
{txt}
{com}. 
.         outsheet using "ME_un2.csv", comma replace
{txt}
{com}. restore
{txt}
{com}. 
. ***************************************************************************************
. ********************** Descriptive Statistics *****************************************
. ***************************************************************************************
. use "Williams Seki and Whitten.dta", clear
{txt}
{com}. 
. sum ep_400_tot_dm annual_ch_rgdppc unem_harm_monthly_lag inf_py_quarterly_lag PM PM_gdp PM_un PM_inf pervote_tm1 ep_400_tot_tm1_dm elec_ep_400_tot_tm1_dm elec_fam_ep_400_tot_tm1_dm abs_pr niche

{txt}    Variable {c |}       Obs        Mean    Std. Dev.       Min        Max
{hline 13}{c +}{hline 56}
ep_400_~t_dm {c |}{res}      1231   -.2609831    10.01474  -24.74305     46.824
{txt}annual_ch_~c {c |}{res}      1231    2.360073    2.508544  -7.451039   11.02529
{txt}unem_harm_~g {c |}{res}      1231    6.500203    3.834291         .1       20.3
{txt}inf_py_qua~g {c |}{res}      1231    5.029448     4.35284  -1.068802   23.36246
{txt}{space 10}PM {c |}{res}      1231    .1714054     .377016          0          1
{txt}{hline 13}{c +}{hline 56}
{space 6}PM_gdp {c |}{res}      1231    .4223046    1.412552  -7.451039   11.02529
{txt}{space 7}PM_un {c |}{res}      1231    1.055524    2.779404          0       20.3
{txt}{space 6}PM_inf {c |}{res}      1231    .8795489    2.692067  -1.068802   23.36246
{txt}{space 1}pervote_tm1 {c |}{res}      1231    16.23508     14.2352          0   57.55701
{txt}ep_400_~1_dm {c |}{res}      1231     -.32177    10.52568  -25.02129   56.18986
{txt}{hline 13}{c +}{hline 56}
elec_ep_40~m {c |}{res}      1231   -.5611423    6.207463  -23.69443   29.12743
{txt}elec_fam_e~m {c |}{res}      1231    1.052525    10.50387  -18.92053    67.8428
{txt}{space 6}abs_pr {c |}{res}      1231    15.55693    11.45924          0       62.5
{txt}{space 7}niche {c |}{res}      1231    .1884647    .3912417          0          1
{txt}
{com}. 
. bys ccode: sum ep_400_tot

{txt}{hline}
-> ccode = Canada

    Variable {c |}       Obs        Mean    Std. Dev.       Min        Max
{hline 13}{c +}{hline 56}
{space 2}ep_400_tot {c |}{res}        63    32.71203    12.25676   7.886434   73.76884

{txt}{hline}
-> ccode = Great Britain

    Variable {c |}       Obs        Mean    Std. Dev.       Min        Max
{hline 13}{c +}{hline 56}
{space 2}ep_400_tot {c |}{res}        34    20.02969    6.951746   9.578545   33.53354

{txt}{hline}
-> ccode = Ireland

    Variable {c |}       Obs        Mean    Std. Dev.       Min        Max
{hline 13}{c +}{hline 56}
{space 2}ep_400_tot {c |}{res}        34    23.98086    10.51985   7.759882   52.14724

{txt}{hline}
-> ccode = Netherlands

    Variable {c |}       Obs        Mean    Std. Dev.       Min        Max
{hline 13}{c +}{hline 56}
{space 2}ep_400_tot {c |}{res}        64    19.84568    5.536473   5.653711       36.2

{txt}{hline}
-> ccode = Belgium

    Variable {c |}       Obs        Mean    Std. Dev.       Min        Max
{hline 13}{c +}{hline 56}
{space 2}ep_400_tot {c |}{res}        99    19.09507    8.369953   1.052632   57.14285

{txt}{hline}
-> ccode = Luxembourg

    Variable {c |}       Obs        Mean    Std. Dev.       Min        Max
{hline 13}{c +}{hline 56}
{space 2}ep_400_tot {c |}{res}        22     22.4679    4.904236   14.33797   36.90322

{txt}{hline}
-> ccode = France

    Variable {c |}       Obs        Mean    Std. Dev.       Min        Max
{hline 13}{c +}{hline 56}
{space 2}ep_400_tot {c |}{res}        35    23.99666    11.11467          0   45.45455

{txt}{hline}
-> ccode = Spain

    Variable {c |}       Obs        Mean    Std. Dev.       Min        Max
{hline 13}{c +}{hline 56}
{space 2}ep_400_tot {c |}{res}        72    23.88929    6.753775   9.574469   39.34837

{txt}{hline}
-> ccode = Portugal

    Variable {c |}       Obs        Mean    Std. Dev.       Min        Max
{hline 13}{c +}{hline 56}
{space 2}ep_400_tot {c |}{res}        48    22.55725    10.26849   .9259259      51.25

{txt}{hline}
-> ccode = Germany

    Variable {c |}       Obs        Mean    Std. Dev.       Min        Max
{hline 13}{c +}{hline 56}
{space 2}ep_400_tot {c |}{res}        18    21.47163    8.501714   4.054055   32.43933

{txt}{hline}
-> ccode = Austria

    Variable {c |}       Obs        Mean    Std. Dev.       Min        Max
{hline 13}{c +}{hline 56}
{space 2}ep_400_tot {c |}{res}        42    23.84656     12.8352   3.184714   65.63435

{txt}{hline}
-> ccode = Italy

    Variable {c |}       Obs        Mean    Std. Dev.       Min        Max
{hline 13}{c +}{hline 56}
{space 2}ep_400_tot {c |}{res}        84    20.53262    11.82215          0   51.62791

{txt}{hline}
-> ccode = Greece

    Variable {c |}       Obs        Mean    Std. Dev.       Min        Max
{hline 13}{c +}{hline 56}
{space 2}ep_400_tot {c |}{res}        21    17.78114    7.683305   3.282275   31.85841

{txt}{hline}
-> ccode = Finland

    Variable {c |}       Obs        Mean    Std. Dev.       Min        Max
{hline 13}{c +}{hline 56}
{space 2}ep_400_tot {c |}{res}        84    20.27118    10.33365          0   47.80488

{txt}{hline}
-> ccode = Sweden

    Variable {c |}       Obs        Mean    Std. Dev.       Min        Max
{hline 13}{c +}{hline 56}
{space 2}ep_400_tot {c |}{res}        74    22.98004    8.654467   3.448276   47.15284

{txt}{hline}
-> ccode = Norway

    Variable {c |}       Obs        Mean    Std. Dev.       Min        Max
{hline 13}{c +}{hline 56}
{space 2}ep_400_tot {c |}{res}        55    22.04551    8.096961       10.7         44

{txt}{hline}
-> ccode = Denmark

    Variable {c |}       Obs        Mean    Std. Dev.       Min        Max
{hline 13}{c +}{hline 56}
{space 2}ep_400_tot {c |}{res}       138    20.69218     12.6042          0   68.06386

{txt}{hline}
-> ccode = Iceland

    Variable {c |}       Obs        Mean    Std. Dev.       Min        Max
{hline 13}{c +}{hline 56}
{space 2}ep_400_tot {c |}{res}        17    26.08496    12.23978   7.716371   51.11111

{txt}{hline}
-> ccode = Israel

    Variable {c |}       Obs        Mean    Std. Dev.       Min        Max
{hline 13}{c +}{hline 56}
{space 2}ep_400_tot {c |}{res}        51     14.6655    9.572034          0   32.14286

{txt}{hline}
-> ccode = Japan

    Variable {c |}       Obs        Mean    Std. Dev.       Min        Max
{hline 13}{c +}{hline 56}
{space 2}ep_400_tot {c |}{res}        72    22.15685    8.039632   3.417085   42.25353

{txt}{hline}
-> ccode = Australia

    Variable {c |}       Obs        Mean    Std. Dev.       Min        Max
{hline 13}{c +}{hline 56}
{space 2}ep_400_tot {c |}{res}        56    27.76524    11.48339   4.404403   45.30478

{txt}{hline}
-> ccode = New Zealand

    Variable {c |}       Obs        Mean    Std. Dev.       Min        Max
{hline 13}{c +}{hline 56}
{space 2}ep_400_tot {c |}{res}        48     27.2678    10.37959   7.526882   73.33334

{txt}
{com}. tab ccode

         {txt}Country code from {c |}
   Correlates of War, used {c |}
               for merging {c |}      Freq.     Percent        Cum.
{hline 27}{c +}{hline 35}
                    Canada {c |}{res}         63        5.12        5.12
{txt}             Great Britain {c |}{res}         34        2.76        7.88
{txt}                   Ireland {c |}{res}         34        2.76       10.64
{txt}               Netherlands {c |}{res}         64        5.20       15.84
{txt}                   Belgium {c |}{res}         99        8.04       23.88
{txt}                Luxembourg {c |}{res}         22        1.79       25.67
{txt}                    France {c |}{res}         35        2.84       28.51
{txt}                     Spain {c |}{res}         72        5.85       34.36
{txt}                  Portugal {c |}{res}         48        3.90       38.26
{txt}                   Germany {c |}{res}         18        1.46       39.72
{txt}                   Austria {c |}{res}         42        3.41       43.14
{txt}                     Italy {c |}{res}         84        6.82       49.96
{txt}                    Greece {c |}{res}         21        1.71       51.67
{txt}                   Finland {c |}{res}         84        6.82       58.49
{txt}                    Sweden {c |}{res}         74        6.01       64.50
{txt}                    Norway {c |}{res}         55        4.47       68.97
{txt}                   Denmark {c |}{res}        138       11.21       80.18
{txt}                   Iceland {c |}{res}         17        1.38       81.56
{txt}                    Israel {c |}{res}         51        4.14       85.70
{txt}                     Japan {c |}{res}         72        5.85       91.55
{txt}                 Australia {c |}{res}         56        4.55       96.10
{txt}               New Zealand {c |}{res}         48        3.90      100.00
{txt}{hline 27}{c +}{hline 35}
                     Total {c |}{res}      1,231      100.00
{txt}
{com}. 
. preserve
{txt}
{com}.         di _N
{res}1231
{txt}
{com}.         collapse (count) party (min) min_y = year (max) max_y = year, by(ccode)
{txt}
{com}.         list ccode party min_y max_y
{txt}
     {c TLC}{hline 15}{c -}{hline 7}{c -}{hline 7}{c -}{hline 7}{c TRC}
     {c |} {res}        ccode   party   min_y   max_y {txt}{c |}
     {c LT}{hline 15}{c -}{hline 7}{c -}{hline 7}{c -}{hline 7}{c RT}
  1. {c |} {res}       Canada      63    1957    2006 {txt}{c |}
  2. {c |} {res}Great Britain      34    1974    2005 {txt}{c |}
  3. {c |} {res}      Ireland      34    1982    2002 {txt}{c |}
  4. {c |} {res}  Netherlands      64    1971    2003 {txt}{c |}
  5. {c |} {res}      Belgium      99    1971    2003 {txt}{c |}
     {c LT}{hline 15}{c -}{hline 7}{c -}{hline 7}{c -}{hline 7}{c RT}
  6. {c |} {res}   Luxembourg      22    1984    2004 {txt}{c |}
  7. {c |} {res}       France      35    1978    2002 {txt}{c |}
  8. {c |} {res}        Spain      72    1979    2004 {txt}{c |}
  9. {c |} {res}     Portugal      48    1983    2005 {txt}{c |}
 10. {c |} {res}      Germany      18    1994    2005 {txt}{c |}
     {c LT}{hline 15}{c -}{hline 7}{c -}{hline 7}{c -}{hline 7}{c RT}
 11. {c |} {res}      Austria      42    1966    2002 {txt}{c |}
 12. {c |} {res}        Italy      84    1968    2006 {txt}{c |}
 13. {c |} {res}       Greece      21    1985    2000 {txt}{c |}
 14. {c |} {res}      Finland      84    1966    2003 {txt}{c |}
 15. {c |} {res}       Sweden      74    1968    2006 {txt}{c |}
     {c LT}{hline 15}{c -}{hline 7}{c -}{hline 7}{c -}{hline 7}{c RT}
 16. {c |} {res}       Norway      55    1973    2001 {txt}{c |}
 17. {c |} {res}      Denmark     138    1966    2005 {txt}{c |}
 18. {c |} {res}      Iceland      17    1991    2003 {txt}{c |}
 19. {c |} {res}       Israel      51    1981    1999 {txt}{c |}
 20. {c |} {res}        Japan      72    1963    2003 {txt}{c |}
     {c LT}{hline 15}{c -}{hline 7}{c -}{hline 7}{c -}{hline 7}{c RT}
 21. {c |} {res}    Australia      56    1966    2004 {txt}{c |}
 22. {c |} {res}  New Zealand      48    1966    2005 {txt}{c |}
     {c BLC}{hline 15}{c -}{hline 7}{c -}{hline 7}{c -}{hline 7}{c BRC}

{com}. restore
{txt}
{com}. 
. pwcorr rile purge_rile, sig

             {txt}{c |}     rile purge_~e
{hline 13}{c +}{hline 18}
        rile {c |} {res}  1.0000 
             {txt}{c |}
             {c |}
  purge_rile {c |} {res}  0.9136   1.0000 
             {txt}{c |}{res}   0.0000
             {txt}{c |}

{com}. 
. gen type = .
{txt}(1231 missing values generated)

{com}. replace type = 1 if O == 1
{txt}(834 real changes made)

{com}. replace type = 2 if G == 1 & PM == 0 & FM == 0
{txt}(150 real changes made)

{com}. replace type = 3 if G == 1 & PM == 0 & FM == 1
{txt}(36 real changes made)

{com}. replace type = 4 if G == 1 & PM == 1 & FM == 0
{txt}(57 real changes made)

{com}. replace type = 5 if PM == 1 & FM == 1
{txt}(154 real changes made)

{com}. 
. lab def type 1 "Opposition" 2 "Government, Neither" 3 "FM Only" 4 "PM Only" 5 "PM & FM"
{txt}
{com}. lab val type type
{txt}
{com}. 
. tab type

               {txt}type {c |}      Freq.     Percent        Cum.
{hline 20}{c +}{hline 35}
         Opposition {c |}{res}        834       67.75       67.75
{txt}Government, Neither {c |}{res}        150       12.19       79.94
{txt}            FM Only {c |}{res}         36        2.92       82.86
{txt}            PM Only {c |}{res}         57        4.63       87.49
{txt}            PM & FM {c |}{res}        154       12.51      100.00
{txt}{hline 20}{c +}{hline 35}
              Total {c |}{res}      1,231      100.00
{txt}
{com}. 
. log close
      {txt}name:  {res}<unnamed>
       {txt}log:  {res}C:\Users\williamslaro\Documents\Research\Projects\Spatial Economic Voting\TAMU 2013\PSR&M\Replication\Williams Seki and Whitten--Replication.smcl
  {txt}log type:  {res}smcl
 {txt}closed on:  {res}29 May 2014, 09:27:40
{txt}{.-}
{smcl}
{txt}{sf}{ul off}